aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMosder <git@mosder.eu>2026-09-12 20:06:13 +0200
committerMosder <git@mosder.eu>2026-09-12 20:11:03 +0200
commit979de81cc18784dd88516655a20650ce69196096 (patch)
tree4221237da1efaf2a7901669123ce5baf168ea4da /include
parent5f5d33d07a0cd28f0bf8dd4bd106d355bf705a18 (diff)
fix: fixed stale cap in rehash and added an error when MOS_HM_LOAD_FACTOR would have an incorrect value
Diffstat (limited to 'include')
-rw-r--r--include/moslib/ds/hashmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/moslib/ds/hashmap.h b/include/moslib/ds/hashmap.h
index ee5de6f..d299b58 100644
--- a/include/moslib/ds/hashmap.h
+++ b/include/moslib/ds/hashmap.h
@@ -129,6 +129,9 @@
#ifndef MOS_HM_LOAD_FACTOR
#define MOS_HM_LOAD_FACTOR 75
#endif // MOS_HM_LOAD_FACTOR
+#if MOS_HM_LOAD_FACTOR < 1 || MOS_HM_LOAD_FACTOR > 100
+#error MOS_HM_LOAD_FACTOR should be an integer value between 1 and 100
+#endif
#ifndef MOS_FORCE_PREFIXES