From cd11107bb44ac719709e10264e9e6ba6a1cfae0c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 16 Feb 2018 18:28:58 -0800 Subject: [PATCH] Another bitops fallback fix I'm confident that all bugs are hashed out now. --- src/hb-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-private.hh b/src/hb-private.hh index 8461f641b..583b56153 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -474,7 +474,7 @@ _hb_ctz (T v) { /* "bithacks" */ unsigned int c = 32; - v &= -signed(v); + v &= - (int32_t) v; if (v) c--; if (v & 0x0000FFFF) c -= 16; if (v & 0x00FF00FF) c -= 8; @@ -487,7 +487,7 @@ _hb_ctz (T v) { /* "bithacks" */ unsigned int c = 64; - v &= -signed(v); + v &= - (int64_t) (v); if (v) c--; if (v & 0x00000000FFFFFFFF) c -= 32; if (v & 0x0000FFFF0000FFFF) c -= 16;