fixed bug in HashMap

This commit is contained in:
Timerix 2025-07-21 16:02:31 +03:00
parent be2c4e7792
commit e16a0035a4

View File

@ -83,7 +83,7 @@ void* NULLABLE(HashMap_tryGetPtr)(HashMap* ptr, str key){
static void __HashMap_expand(HashMap* ptr){
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
u32 height_expanded = ((u32*)__HashMap_heights.data)[height_expanded_n];