From 98bddbc8ef3330bc5635f6255e6b9c16593a1934 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 28 Oct 2018 23:14:15 -0700 Subject: [PATCH] [sbix] Minor --- src/hb-ot-color-sbix-table.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh index 4a14a69..39f8512 100644 --- a/src/hb-ot-color-sbix-table.hh +++ b/src/hb-ot-color-sbix-table.hh @@ -182,7 +182,8 @@ struct sbix inline const SBIXStrike &choose_strike (hb_font_t *font) const { - if (unlikely (!table->strikes.len)) + unsigned count = table->strikes.len; + if (unlikely (!count)) return Null(SBIXStrike); unsigned int requested_ppem = MAX (font->x_ppem, font->y_ppem); @@ -192,7 +193,7 @@ struct sbix unsigned int best_i = 0; unsigned int best_ppem = table->get_strike (0).ppem; - for (unsigned int i = 1; i < table->strikes.len; i++) + for (unsigned int i = 1; i < count; i++) { unsigned int ppem = (table->get_strike (i)).ppem; if ((requested_ppem <= ppem && ppem < best_ppem) || -- 2.7.4