[morx] Clear stack upon underflow when acting ligatures

This commit is contained in:
Behdad Esfahbod 2018-10-23 00:39:44 -07:00
parent 1bfb96a9c8
commit 0e5bcdef7f
1 changed files with 4 additions and 0 deletions

View File

@ -402,7 +402,11 @@ struct LigatureSubtable
do
{
if (unlikely (!cursor))
{
/* Stack underflow. Clear the stack. */
match_length = 0;
break;
}
buffer->move_to (match_positions[--cursor]);