From 1300f027a938d8898cdc9abbcad71afadf70e6e6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 12 Nov 2018 13:56:48 -0500 Subject: [PATCH] [kerx] Minor tweak on previous commit --- src/hb-aat-layout-kerx-table.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index 4e6c6e405..ccba8fe18 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -260,7 +260,7 @@ struct KerxSubTableFormat1 depth = 0; /* Probably not what CoreText does, but better? */ } - if (depth && Format1EntryT::performAction (entry)) + if (Format1EntryT::performAction (entry) && depth) { unsigned int tuple_count = MAX (1u, table->header.tuple_count ()); @@ -279,9 +279,9 @@ struct KerxSubTableFormat1 * "Each pops one glyph from the kerning stack and applies the kerning value to it. * The end of the list is marked by an odd value... */ bool last = false; - while (!last && depth--) + while (!last && depth) { - unsigned int idx = stack[depth]; + unsigned int idx = stack[--depth]; int v = *actions; actions += tuple_count; if (idx >= buffer->len) continue;