Fix sign of shift operators This one: map->mask = (1 << (next_bit + bits_needed)) - (1 << next_bit); before the fix, the shift was done as an int, causing overflow if it ever got to 1 << 31. Sprinkle 'u's around. Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=634805
diff --git a/src/hb-directwrite.cc b/src/hb-directwrite.cc index 09889d0..6846a86 100644 --- a/src/hb-directwrite.cc +++ b/src/hb-directwrite.cc
@@ -586,7 +586,7 @@ textString[chars_len++] = 0xFFFDu; else { textString[chars_len++] = 0xD800u + ((c - 0x10000u) >> 10); - textString[chars_len++] = 0xDC00u + ((c - 0x10000u) & ((1 << 10) - 1)); + textString[chars_len++] = 0xDC00u + ((c - 0x10000u) & ((1u << 10) - 1)); } }