fixed bug in HashMap
This commit is contained in:
parent
be2c4e7792
commit
e16a0035a4
@ -83,7 +83,7 @@ void* NULLABLE(HashMap_tryGetPtr)(HashMap* ptr, str key){
|
|||||||
|
|
||||||
static void __HashMap_expand(HashMap* ptr){
|
static void __HashMap_expand(HashMap* ptr){
|
||||||
u32 height_expanded_n = ptr->height_n + 1;
|
u32 height_expanded_n = ptr->height_n + 1;
|
||||||
assert(height_expanded_n >= Array_len(&__HashMap_heights, u32) && "HashMap IS FULL! Fix your code.");
|
assert(height_expanded_n < Array_len(&__HashMap_heights, u32) && "HashMap IS FULL! Fix your code.");
|
||||||
|
|
||||||
// alloc new HashMapBucket array
|
// alloc new HashMapBucket array
|
||||||
u32 height_expanded = ((u32*)__HashMap_heights.data)[height_expanded_n];
|
u32 height_expanded = ((u32*)__HashMap_heights.data)[height_expanded_n];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user