< prev index next >

src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp

Print this page
rev 1554 : 8158302: Handle contextual glyph substitutions
Reviewed-by: prr

@@ -61,14 +61,14 @@
 {
     firstGlyph = 0;
     lastGlyph = 0;
 }
 
-ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
+ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index, LEErrorCode &success)
 {
-  LEErrorCode success = LE_NO_ERROR; // todo- make a param?
-  const IndicRearrangementStateEntry *entry = entryTable.getAlias(index,success);
+    const IndicRearrangementStateEntry *entry = entryTable.getAlias(index, success);
+    if (LE_FAILURE(success)) return 0;
     ByteOffset newState = SWAPW(entry->newStateOffset);
     IndicRearrangementFlags flags = (IndicRearrangementFlags) SWAPW(entry->flags);
 
     if (currGlyph < 0 || currGlyph >= glyphStorage.getGlyphCount()) {
        success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
< prev index next >