X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..4d9eefca008a7bc544144ef830fa144ce89deaa0:/icuSources/layout/OpenTypeUtilities.cpp diff --git a/icuSources/layout/OpenTypeUtilities.cpp b/icuSources/layout/OpenTypeUtilities.cpp index f6d657e5..29c38ddc 100644 --- a/icuSources/layout/OpenTypeUtilities.cpp +++ b/icuSources/layout/OpenTypeUtilities.cpp @@ -1,6 +1,6 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2006 - All Rights Reserved * */ @@ -86,6 +86,10 @@ le_int32 OpenTypeUtilities::getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRan le_int32 probe = power; le_int32 range = 0; + if (recordCount == 0) { + return -1; + } + if (SWAPW(records[extra].firstGlyph) <= glyphID) { range = extra; }