[HarfBuzz] harfbuzz: Branch 'bitops'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sat Feb 17 01:33:44 UTC 2018
src/hb-private.hh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 6d5c0bf8b18ed53e8d40dcbae83ec66ed2116843
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Feb 16 17:33:26 2018 -0800
Fix bitops fallback impl
diff --git a/src/hb-private.hh b/src/hb-private.hh
index 7c2de152..a8bc5ed1 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -402,7 +402,7 @@ _hb_bit_storage (T v)
/* "bithacks" */
const unsigned int b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
const unsigned int S[] = {1, 2, 4, 8, 16};
- unsigned int r = 0;
+ unsigned int r = 1;
for (int i = 4; i >= 0; i--)
if (v & b[i])
{
@@ -416,7 +416,7 @@ _hb_bit_storage (T v)
/* "bithacks" */
const uint64_t b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000, 0xFFFFFFFF00000000};
const unsigned int S[] = {1, 2, 4, 8, 16, 32};
- unsigned int r = 0;
+ unsigned int r = 1;
for (int i = 5; i >= 0; i--)
if (v & b[i])
{
More information about the HarfBuzz
mailing list