[kerx] Minor tweak on previous commit

This commit is contained in:
Behdad Esfahbod 2018-11-12 13:56:48 -05:00
parent d6666b3866
commit 1300f027a9

View File

@ -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;