mdbx: fix key_from_jsonInteger() for MSVC.

Change-Id: I3fc6a6da57707750cb2e8429bbaf10ff1de2dde2
This commit is contained in:
Leonid Yuriev 2020-01-28 01:47:50 +03:00
parent 2c08ec21fd
commit 7ea1a4e0e8

View File

@ -17808,14 +17808,14 @@ static __inline int clz64(uint64_t value) {
unsigned long index;
#if defined(_M_AMD64) || defined(_M_ARM64) || defined(_M_X64)
_BitScanReverse64(&index, value);
return index;
return 63 - index;
#else
if (value > UINT32_MAX) {
_BitScanReverse(&index, (uint32_t)(value >> 32));
return index;
return 31 - index;
}
_BitScanReverse(&index, (uint32_t)value);
return index + 32;
return 63 - index;
#endif
#endif /* MSVC */