aboutsummaryrefslogtreecommitdiffstats
path: root/cheesemap.c
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-04-12 21:59:29 +0200
committerFabrice <fabrice@schaub-dev.xyz>2026-04-12 21:59:29 +0200
commit8ce63976893cd00b39abf2da7fb560313dcabca7 (patch)
tree3fb62c50d8ab5824fceb4b2b634633b437c8222c /cheesemap.c
parent6584ac612ccc07ff8806e26af0480e2bc7804510 (diff)
correctness fix
Diffstat (limited to 'cheesemap.c')
-rw-r--r--cheesemap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cheesemap.c b/cheesemap.c
index ea3126b..9bcbbab 100644
--- a/cheesemap.c
+++ b/cheesemap.c
@@ -55,7 +55,7 @@ CM_ATTR(hot) static inline cm_usize cm_bitmask_clz(bitmask_t mask) {
#if CM_GROUP_SIZE == 8
return cm_clz(mask) / CHAR_BIT;
#elif CM_GROUP_SIZE == 16
- return cm_clz(mask);
+ return cm_clz(mask) - (CM_WORD_WIDTH - CM_GROUP_SIZE);
#else
#error "unknown group size"
#endif