Fix 87911bdf: Fix FindLastBit for unsigned long long (uint64 on Windows)

See: #594
This commit is contained in:
Jonathan G Rennison
2023-09-05 00:39:44 +01:00
parent 20ece8025e
commit a48a3ac07b

View File

@@ -258,7 +258,7 @@ static inline uint8 FindLastBit(T value)
} else if (sizeof(T) == sizeof(unsigned long)) { } else if (sizeof(T) == sizeof(unsigned long)) {
return __builtin_clzl(1) - __builtin_clzl(unsigned_value); return __builtin_clzl(1) - __builtin_clzl(unsigned_value);
} else { } else {
return __builtin_clzll(1) - __builtin_ctzll(unsigned_value); return __builtin_clzll(1) - __builtin_clzll(unsigned_value);
} }
#else #else
extern uint8 FindLastBit64(uint64 x); extern uint8 FindLastBit64(uint64 x);