Skip to content

Commit

Permalink
fix a bug in freeze_hashset: set->ones->cap may less than set->size
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanjue committed Oct 13, 2018
1 parent b9a5c14 commit b7c775a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hashset.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ static inline int freeze_##hash_type(hash_type *set, float load_factor){ \
if(j < hvs[i]) j = hvs[i]; \
j ++; \
} \
if(j < sz) j = sz; \
set->ones = init_bitvec(j + 1); \
for(i=j=0;i<set->count;i++){ \
if(j < hvs[i]) j = hvs[i]; \
Expand Down

0 comments on commit b7c775a

Please sign in to comment.