summaryrefslogtreecommitdiff
path: root/py/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/misc.h')
-rw-r--r--py/misc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/misc.h b/py/misc.h
index 8ac80bb7b..2629d0c46 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -357,7 +357,7 @@ static inline uint32_t mp_clzll(unsigned long long x) {
// Microsoft don't ship _BitScanReverse64 on Win32, so emulate it
static inline uint32_t mp_clzll(unsigned long long x) {
unsigned long h = x >> 32;
- return h ? mp_clzl(h) : (mp_clzl(x) + 32);
+ return h ? mp_clzl(h) : (mp_clzl((unsigned long)x) + 32);
}
#endif