summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/internal/atomic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/atomic.h b/src/internal/atomic.h
index 99539cc0..96c1552d 100644
--- a/src/internal/atomic.h
+++ b/src/internal/atomic.h
@@ -319,7 +319,7 @@ static inline int a_clz_64(uint64_t x)
#define a_clz_32 a_clz_32
static inline int a_clz_32(uint32_t x)
{
- x--;
+ x >>= 1;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;