diff --git a/src/hashset.asm b/src/hashset.asm index e1293ed..93d2be0 100644 --- a/src/hashset.asm +++ b/src/hashset.asm @@ -53,6 +53,11 @@ pub contains: add r13, r13, 12 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 add r10, r9, 16