From af50174b71853f3ca887fc0e064e88258c412f2c Mon Sep 17 00:00:00 2001 From: Sara Date: Tue, 17 Sep 2024 21:36:43 +0200 Subject: [PATCH] fix: fixed hash map get returns not being correct --- hash_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash_map.c b/hash_map.c index b1b2190..b0fe7d3 100644 --- a/hash_map.c +++ b/hash_map.c @@ -25,7 +25,7 @@ void *hash_map_get_raw(HashMap *self, void *key) { for(size_t i = 0; i < bucket.len; ++i) { uintptr_t *key_at = list_at(&bucket, i); if(hash == *key_at) - return ++key_at; + return ((char*)key_at) + sizeof(uintptr_t) + self->key_size; } return NULL; }