From dce6ec8b41711621f017b9219bafb601dd04e3aa Mon Sep 17 00:00:00 2001 From: Daan Date: Tue, 18 Feb 2025 06:45:12 -0800 Subject: [PATCH] fix find_highest_bit --- src/bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitmap.c b/src/bitmap.c index 1c28fe44..3907e91d 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -49,7 +49,7 @@ static inline bool mi_bfield_find_least_bit(mi_bfield_t x, size_t* idx) { // return false if `x==0` (with `*idx` undefined) and true otherwise, // with the `idx` is set to the bit index (`0 <= *idx < MI_BFIELD_BITS`). static inline bool mi_bfield_find_highest_bit(mi_bfield_t x, size_t* idx) { - return mi_bsf(x, idx); + return mi_bsr(x, idx); }