diff options
Diffstat (limited to 'clox/src/table.c')
-rw-r--r-- | clox/src/table.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clox/src/table.c b/clox/src/table.c index 134f455..2405397 100644 --- a/clox/src/table.c +++ b/clox/src/table.c @@ -131,8 +131,8 @@ ObjString *tableFindString(Table *table, const char *chars, int length, /* Stop if we find an empty non-tombstone entry. */ if (IS_NIL(entry->value)) return NULL; - } else if (entry->key->length == length && entry->key->hash == hash && - memcmp(entry->key->chars, chars, length) == 0) { + } else if (entry->key->length == length && entry->key->hash == hash + && memcmp(entry->key->chars, chars, length) == 0) { /* We found it. */ return entry->key; } |