Latte: use 32-bit version of __builtin_clz

__builtin_clzl is the 64 bit version

For example for _Mask 32 it calculated 31 - 58 = -27
Cast to uint32 gives 4294967269
This commit is contained in:
Fabio Arnold 2026-03-18 22:56:44 +01:00
parent bc21013d21
commit d4857e8749

View File

@ -12,7 +12,7 @@ namespace LatteAddrLib
{
if (!_Mask)
return 0;
*_Index = 31 - __builtin_clzl(_Mask);
*_Index = 31 - __builtin_clz(_Mask);
return 1;
}
#endif