]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/layout/OpenTypeUtilities.cpp
ICU-511.25.tar.gz
[apple/icu.git] / icuSources / layout / OpenTypeUtilities.cpp
index 8a3cd2c1f1c644981e419561bcdaa29a35f77bcd..29c38ddc104ff16301fc62ce6a7356df5dc2b523 100644 (file)
@@ -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;
     }