From 18a06f8a662ca7a9e63f74c6443e24a035c40655 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 5 Jul 2018 14:03:48 +0430 Subject: [PATCH] Fix warning ../../src/hb-ot-layout-gsubgpos-private.hh:391:18: warning: missed loop optimization, the loop counter may overflow [-Wunsafe-loop-optimizations] --- src/hb-ot-layout-gsubgpos-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];