Browse Source

potential fix for MSVC compile error

pull/4807/head
Rico P 3 days ago
committed by GitHub
parent
commit
7dc409d060
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/external/sinfl.h

+ 3
- 3
src/external/sinfl.h View File

@ -172,9 +172,9 @@ extern int zsinflate(void *out, int cap, const void *in, int size);
static int static int
sinfl_bsr(unsigned n) { sinfl_bsr(unsigned n) {
#ifdef _MSC_VER #ifdef _MSC_VER
unsigned long r = 0;
_BitScanReverse(&r, n);
return int(r);
unsigned long uln = 0;
_BitScanReverse(&uln, n);
return int(uln);
#else // defined(__GNUC__) || defined(__clang__) || defined(__TINYC__) #else // defined(__GNUC__) || defined(__clang__) || defined(__TINYC__)
return 31 - __builtin_clz(n); return 31 - __builtin_clz(n);
#endif #endif

Loading…
Cancel
Save