X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..4d9eefca008a7bc544144ef830fa144ce89deaa0:/icuSources/layout/OpenTypeUtilities.cpp diff --git a/icuSources/layout/OpenTypeUtilities.cpp b/icuSources/layout/OpenTypeUtilities.cpp index 8a3cd2c1..29c38ddc 100644 --- a/icuSources/layout/OpenTypeUtilities.cpp +++ b/icuSources/layout/OpenTypeUtilities.cpp @@ -1,7 +1,6 @@ /* - * @(#)OpenTypeUtilities.cpp 1.6 00/03/15 * - * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2006 - All Rights Reserved * */ @@ -87,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; }