Added handling item actually having hash 0

This commit is contained in:
Michał Isalski
2026-09-16 20:19:47 +02:00
parent 2c2d6ec140
commit 2e9e7a176f
+5
View File
@@ -53,6 +53,11 @@ pub contains:
add r13, r13, 12 add r13, r13, 12
jmp r3 ; Calling the hash function with element in r1, context in r2 jmp r3 ; Calling the hash function with element in r1, context in r2
cmp r1, rz
jne contains_skip_one
add r1, r1, 1 ; If hash is zero, we add 1. That way hash being 0 means the item does not exist at a position
contains_skip_one:
mov r12, r1 mov r12, r1
add r10, r9, 16 add r10, r9, 16