diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 661085d51..cbaa64880 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -388,7 +388,7 @@ struct hb_ot_apply_context_t : inline bool prev (void) { assert (num_items > 0); - while (idx >= num_items) + while (idx > num_items - 1) { idx--; const hb_glyph_info_t &info = c->buffer->out_info[idx];