usp10: Correct an endless loop in Chaining Contextual Substitution if it is a dead rule.
This commit is contained in:
parent
0ce27385fd
commit
4b2bfb4a8b
|
@ -1026,6 +1026,8 @@ static INT GSUB_apply_ChainContextSubst(const GSUB_LookupList* lookup, const GSU
|
|||
|
||||
ccsf3_4 = (const GSUB_ChainContextSubstFormat3_4 *)(((LPBYTE)ccsf3_3)+sizeof(GSUB_ChainContextSubstFormat3_3) + (sizeof(WORD) * (GET_BE_WORD(ccsf3_3->LookaheadGlyphCount)-1)));
|
||||
|
||||
if (GET_BE_WORD(ccsf3_4->SubstCount))
|
||||
{
|
||||
for (k = 0; k < GET_BE_WORD(ccsf3_4->SubstCount); k++)
|
||||
{
|
||||
int lookupIndex = GET_BE_WORD(ccsf3_4->SubstLookupRecord[k].LookupListIndex);
|
||||
|
@ -1041,6 +1043,8 @@ static INT GSUB_apply_ChainContextSubst(const GSUB_LookupList* lookup, const GSU
|
|||
}
|
||||
return newIndex;
|
||||
}
|
||||
else return GSUB_E_NOGLYPH;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue