- for (glyph = 0; glyph < glyphCount; glyph += 1) {
- const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segments, glyphs[glyph]);
+ for (glyph = 0; glyph < glyphCount && LE_SUCCESS(success); glyph += 1) {
+ LEGlyphID thisGlyph = glyphStorage[glyph];
+ const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segmentSingleLookupTable, segments, thisGlyph, success);