8067699: Better glyph storage

Reviewed-by: srl, bae, mschoene
This commit is contained in:
Phil Race 2015-01-15 09:47:06 -08:00
parent e840a34dc2
commit ecdd3ad65a
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
LE_DEBUG_BAD_FONT("off end of ligature substitution header");
return newState; // get out! bad font
}
if(componentGlyph > glyphStorage.getGlyphCount()) {
if(componentGlyph >= glyphStorage.getGlyphCount()) {
LE_DEBUG_BAD_FONT("preposterous componentGlyph");
currGlyph++;
return newState; // get out! bad font

View File

@ -119,7 +119,7 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
offset = action & lafComponentOffsetMask;
if (offset != 0) {
if(componentGlyph > glyphStorage.getGlyphCount()) {
if(componentGlyph >= glyphStorage.getGlyphCount()) {
LE_DEBUG_BAD_FONT("preposterous componentGlyph");
currGlyph+= dir;
return nextStateIndex; // get out! bad font