Fix: Core: bitscan_reverse_uint64 on Windows

Pull Request: https://projects.blender.org/blender/blender/pulls/139283
This commit is contained in:
Miguel Pozo 2025-05-22 17:30:45 +02:00
parent 7614bf9602
commit 9222daacb7

View File

@ -75,7 +75,7 @@ MINLINE unsigned int bitscan_reverse_uint64(unsigned long long a)
#ifdef _MSC_VER
unsigned long clz;
_BitScanReverse64(&clz, a);
return 31 - clz;
return 63 - clz;
#else
return (unsigned int)__builtin_clzll(a);
#endif