fix: fixed hash map get returns not being correct

main
Sara 2024-09-17 21:36:43 +02:00
parent c4ec92fa82
commit af50174b71
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ void *hash_map_get_raw(HashMap *self, void *key) {
for(size_t i = 0; i < bucket.len; ++i) { for(size_t i = 0; i < bucket.len; ++i) {
uintptr_t *key_at = list_at(&bucket, i); uintptr_t *key_at = list_at(&bucket, i);
if(hash == *key_at) if(hash == *key_at)
return ++key_at; return ((char*)key_at) + sizeof(uintptr_t) + self->key_size;
} }
return NULL; return NULL;
} }