Fix infinite loop in normalization code with variation selectors

Reported by Jonathan Kew.
This commit is contained in:
Behdad Esfahbod 2011-10-17 11:39:28 -07:00
parent fd528c17b7
commit af913c5788

View File

@ -143,8 +143,11 @@ decompose_multi_char_cluster (hb_ot_shape_context_t *c,
{
/* TODO Currently if there's a variation-selector we give-up, it's just too hard. */
for (unsigned int i = c->buffer->idx; i < end; i++)
if (unlikely (is_variation_selector (c->buffer->info[i].codepoint)))
if (unlikely (is_variation_selector (c->buffer->info[i].codepoint))) {
while (c->buffer->idx < end)
c->buffer->next_glyph ();
return;
}
while (c->buffer->idx < end)
decompose_current_glyph (c, FALSE);