From bccdcf5b18861fbdb599189ab1dcb45e339b02b2 Mon Sep 17 00:00:00 2001 From: Qunxin Liu Date: Fri, 21 Jul 2023 10:17:43 -0700 Subject: [PATCH] [instancer] fix a bug in compiling deltas_y for gvar --- src/hb-ot-var-common.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-ot-var-common.hh b/src/hb-ot-var-common.hh index 95ca86ea1..01f6531c8 100644 --- a/src/hb-ot-var-common.hh +++ b/src/hb-ot-var-common.hh @@ -719,6 +719,8 @@ struct tuple_delta_t } if (j != rounded_deltas.length) return false; + /* reset i because we reuse rounded_deltas for deltas_y */ + i = 0; encoded_len += encode_delta_run (i, compiled_deltas.as_array ().sub_array (encoded_len), rounded_deltas); } return compiled_deltas.resize (encoded_len);