Bug fix in new bh_hash implementation
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 9 Jun 2020 15:09:00 +0000 (10:09 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 9 Jun 2020 15:09:00 +0000 (10:09 -0500)
include/bh.h
onyx

index a3854e78efb2db7ac996a98eb7563dc8a9093c96..d07b0e423ad75c4ced8f521d9362c49b7432013e 100644 (file)
@@ -1749,6 +1749,7 @@ void bh__hash_delete(bh__hash *table, i32 elemsize, char *key) {
 found_matching:
        bh__arr_deleten((void **) &arrptr, 1, byte_offset, delete_len);
        table->arrs[index] = arrptr;
+       (*(u64 *) arrptr)--;
 
 // OLD:
 //     while (len && strncmp(key, (char *) walker, BH__HASH_STORED_KEY_SIZE) != 0) {
diff --git a/onyx b/onyx
index 748853508d9d1f96d96160e1680a28f3a3db523c..b8520ee29480186e49bfe37a59199c74c5dea7a3 100755 (executable)
Binary files a/onyx and b/onyx differ