From 61eca92055f5cb14ee6ac92342c1df69e6757af8 Mon Sep 17 00:00:00 2001 From: FreddieLi <53027353+FreddieLi@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:09:06 +0800 Subject: [PATCH] fix get() in hash_map_chaining.c (#845) Fix get function. --- codes/c/chapter_hashing/hash_map_chaining.c | 1 + 1 file changed, 1 insertion(+) diff --git a/codes/c/chapter_hashing/hash_map_chaining.c b/codes/c/chapter_hashing/hash_map_chaining.c index 94e7202e0..fec4778ee 100644 --- a/codes/c/chapter_hashing/hash_map_chaining.c +++ b/codes/c/chapter_hashing/hash_map_chaining.c @@ -88,6 +88,7 @@ const char *get(hashMapChaining *hashmap, const int key) { if (node->key == key) { return node->val; } + node = node->next; } return NULL; }