fix find_highest_bit

This commit is contained in:
Daan 2025-02-18 06:45:12 -08:00
parent f8857a5189
commit dce6ec8b41

View file

@ -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);
}