aboutsummaryrefslogtreecommitdiffstats
path: root/include/container.h
diff options
context:
space:
mode:
authorjustanothercatgirl <sotov2070@gmail.com>2024-07-10 10:34:22 +0300
committerjustanothercatgirl <sotov2070@gmail.com>2024-07-10 10:34:22 +0300
commit7ce795494d10d64f527f5a6076789d20f2f87091 (patch)
treecdbd58cc800a464425baec123747fc0ac13828d5 /include/container.h
parent7f8be5510244568f5e71461eab56e4c77ad7f780 (diff)
Fixed bug in `hset_at` function
Diffstat (limited to 'include/container.h')
-rw-r--r--include/container.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/container.h b/include/container.h
index 6ac9054..db4fa4f 100644
--- a/include/container.h
+++ b/include/container.h
@@ -1278,7 +1278,7 @@ char hset_insert_mallocated(struct hash_set* set, void* element) {
}
void* hset_at(struct hash_set* set, void* element) {
size_t index = set->hash(element) % array_size(set->buckets);
- if (ll_search(set->buckets, element, set->eq))
+ if (ll_search(set->buckets + index, element, set->eq))
return ll_find(set->buckets + index, element, set->eq)->data;
return NULL;
}