Fixed GB_TABLE rehash

This commit is contained in:
Tyler Erickson 2018-05-05 12:32:33 -07:00
parent 0378924916
commit 3561f653e8
1 changed files with 1 additions and 1 deletions

2
gb.h
View File

@ -1876,7 +1876,7 @@ void GB_JOIN2(FUNC,rehash)(NAME *h, isize new_count) { \
gbHashTableFindResult fr; \ gbHashTableFindResult fr; \
if (gb_array_count(nh.hashes) == 0) \ if (gb_array_count(nh.hashes) == 0) \
GB_JOIN2(FUNC,grow)(&nh); \ GB_JOIN2(FUNC,grow)(&nh); \
e = &nh.entries[i]; \ e = &h->entries[i]; \
fr = GB_JOIN2(FUNC,_find)(&nh, e->key); \ fr = GB_JOIN2(FUNC,_find)(&nh, e->key); \
j = GB_JOIN2(FUNC,_add_entry)(&nh, e->key); \ j = GB_JOIN2(FUNC,_add_entry)(&nh, e->key); \
if (fr.entry_prev < 0) \ if (fr.entry_prev < 0) \