From 5f15fca66206af36cafc9a7b650462b544460d6e Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Thu, 21 Mar 2019 10:18:03 -0700 Subject: [PATCH] fix short count optimization --- src/hb-ot-layout-common.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 02c422a86..e7332faf0 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -1762,8 +1762,8 @@ struct VarData { unsigned int old = remap.to_old (i); if (unlikely (old >= src->itemCount)) return_trace (false); - int16_t hi = get_item_delta (old, short_count - 1) & 0xFF00; - if (hi != 0 && hi != 0xFF00) goto found_short; + int16_t delta = get_item_delta (old, short_count - 1); + if (-128 <= delta && delta <= 127) goto found_short; } found_short: