From 7ec1c41a55729808d61cb85fb2d632e0b488f53f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 23 Nov 2022 21:12:41 -0700 Subject: [PATCH] [gsubgpos] Skippy-iter: Prefer correctness to performance Prefer unsafe-to-concat correctness, over performance. --- src/hb-ot-layout-gsubgpos.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index cd011b06e..561c72749 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -535,7 +535,7 @@ struct hb_ot_apply_context_t : bool next (unsigned *unsafe_to = nullptr) { assert (num_items > 0); - while (idx + num_items < end) + while (idx + 1/*num_items*/ < end) { idx++; hb_glyph_info_t &info = c->buffer->info[idx]; @@ -568,7 +568,7 @@ struct hb_ot_apply_context_t : bool prev (unsigned *unsafe_from = nullptr) { assert (num_items > 0); - while (idx > num_items - 1) + while (idx > 0/*num_items - 1*/) { idx--; hb_glyph_info_t &info = c->buffer->out_info[idx];