X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..586446045a9ad027ace9532db9e32639f87706dd:/icuSources/layout/MultipleSubstSubtables.cpp?ds=sidebyside diff --git a/icuSources/layout/MultipleSubstSubtables.cpp b/icuSources/layout/MultipleSubstSubtables.cpp index 450bf35b..7ff155be 100644 --- a/icuSources/layout/MultipleSubstSubtables.cpp +++ b/icuSources/layout/MultipleSubstSubtables.cpp @@ -1,6 +1,6 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -14,8 +14,12 @@ U_NAMESPACE_BEGIN -le_uint32 MultipleSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 MultipleSubstitutionSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode& success, const LEGlyphFilter *filter) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); // If there's a filter, we only want to do the @@ -29,7 +33,7 @@ le_uint32 MultipleSubstitutionSubtable::process(GlyphIterator *glyphIterator, co return 0; } - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); le_uint16 seqCount = SWAPW(sequenceCount); if (coverageIndex >= 0 && coverageIndex < seqCount) { @@ -62,7 +66,11 @@ le_uint32 MultipleSubstitutionSubtable::process(GlyphIterator *glyphIterator, co } } - LEGlyphID *newGlyphs = glyphIterator->insertGlyphs(glyphCount); + LEGlyphID *newGlyphs = glyphIterator->insertGlyphs(glyphCount, success); + if (LE_FAILURE(success)) { + return 0; + } + le_int32 insert = 0, direction = 1; if (glyphIterator->isRightToLeft()) {