From e155f1230702afb6b81b2c2901087945e5d4d249 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 3 Dec 2022 14:14:39 -0700 Subject: [PATCH] [VarData] Minor save a variable --- src/hb-ot-layout-common.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 5de55becf..cc9ee83d4 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2542,9 +2542,10 @@ struct VarData for (r = 0; r < ri_count; r++) if (delta_sz[r]) regionIndices[ri_map[r]] = region_map[src->regionIndices[r]]; - for (unsigned int i = 0; i < itemCount; i++) + unsigned count = itemCount; + for (unsigned int i = 0; i < count; i++) { - unsigned int old = inner_map.backward (i); + unsigned int old = inner_map.backward (i); for (unsigned int r = 0; r < ri_count; r++) if (delta_sz[r]) set_item_delta (i, ri_map[r], src->get_item_delta (old, r)); }