[gsubgpos] Clean up OT::ClassDefFormat2::intersected_class_glyphs 0 case

This commit is contained in:
Behdad Esfahbod 2022-05-11 13:47:17 -06:00
parent 137af3612b
commit 175319cd89
1 changed files with 10 additions and 8 deletions

View File

@ -2296,16 +2296,18 @@ struct ClassDefFormat2
for (unsigned int i = 0; i < count; i++)
{
if (!hb_set_next (glyphs, &g))
break;
while (g != HB_SET_VALUE_INVALID && g < rangeRecord[i].first)
goto done;
while (g < rangeRecord[i].first)
{
intersect_glyphs->add (g);
hb_set_next (glyphs, &g);
if (!hb_set_next (glyphs, &g))
goto done;
}
g = rangeRecord[i].last;
}
while (g != HB_SET_VALUE_INVALID && hb_set_next (glyphs, &g))
while (hb_set_next (glyphs, &g))
intersect_glyphs->add (g);
done:
return;
}