From 979de81cc18784dd88516655a20650ce69196096 Mon Sep 17 00:00:00 2001 From: Mosder Date: Sat, 12 Sep 2026 20:06:13 +0200 Subject: fix: fixed stale cap in rehash and added an error when MOS_HM_LOAD_FACTOR would have an incorrect value --- include/moslib/ds/hashmap.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') 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 -- cgit v1.2.3