summaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
authorCarson Fleming <[email protected]>2026-02-05 23:21:44 -0500
committerCarson Fleming <[email protected]>2026-02-05 23:42:09 -0500
commit7f79eb03b6a6cd21192feda8dcb5a973f3420c7c (patch)
tree9b2c293820d134ee4434623ae8bdefaecefb0d0d /map.c
parent7784a8cefb54a3c60207557f1c684d2b8e04cf0c (diff)
downloadsafec-7f79eb03b6a6cd21192feda8dcb5a973f3420c7c.tar.gz
add sets which are faster and better + fix bug
Diffstat (limited to 'map.c')
-rw-r--r--map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/map.c b/map.c
index de8aadb..c720bbc 100644
--- a/map.c
+++ b/map.c
@@ -247,7 +247,7 @@ static size_t fetch_set_idx(
if (offset >= set->__num_buckets) return set->__num_buckets;
i++;
offset = i * i;
- idx = base + offset;
+ idx = (base + offset) % set->__num_buckets;
}
}