From c67c1b745bb8306aa6a948f0337a98dc010042a5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 4 Aug 2022 11:42:22 -0600 Subject: [PATCH] VarStore: simplify again --- 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 10e0ae427..c483db15c 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2280,7 +2280,7 @@ struct VarData unsigned int count = regionIndices.len; bool is_long = longWords (); unsigned word_count = wordCount (); - unsigned int scount = is_long ? count - word_count : word_count; + unsigned int scount = is_long ? count : word_count; unsigned int lcount = is_long ? word_count : 0; const HBUINT8 *bytes = get_delta_bytes (); @@ -2296,7 +2296,7 @@ struct VarData delta += scalar * *lcursor++; } const HBINT16 *scursor = reinterpret_cast (lcursor); - for (; i < lcount + scount; i++) + for (; i < scount; i++) { float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache); delta += scalar * *scursor++;