Commit c017f072e477aa306f6301f7049dbe699613996e

Werner Lemberg 2012-01-02T22:33:42

Fix tracing message for `loca' table. * src/truetype/ttpload.c (tt_face_get_location): Don't emit a warning message if the last `loca' entry references an empty glyph.

diff --git a/ChangeLog b/ChangeLog
index 1dc61e0..abcb5a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-01-02  Werner Lemberg  <wl@gnu.org>
+
+	Fix tracing message for `loca' table.
+
+	* src/truetype/ttpload.c (tt_face_get_location): Don't emit a
+	warning message if the last `loca' entry references an empty glyph.
+
 2011-12-10  Werner Lemberg  <wl@gnu.org>
 
 	Add some variable initializations.
@@ -3487,7 +3494,7 @@
 
 ----------------------------------------------------------------------------
 
-Copyright 2010-2011 by
+Copyright 2010-2012 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c
index 7b92b66..bb6005d 100644
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType-specific tables loader (body).                              */
 /*                                                                         */
-/*  Copyright 1996-2002, 2004-2011 by                                      */
+/*  Copyright 1996-2002, 2004-2012 by                                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -211,7 +211,7 @@
     }
 
     /* Check broken location data */
-    if ( pos1 >= face->glyf_len )
+    if ( pos1 > face->glyf_len )
     {
       FT_TRACE1(( "tt_face_get_location:"
                   " too large offset=0x%08lx found for gid=0x%04lx,"
@@ -221,7 +221,7 @@
       return 0;
     }
 
-    if ( pos2 >= face->glyf_len )
+    if ( pos2 > face->glyf_len )
     {
       FT_TRACE1(( "tt_face_get_location:"
                   " too large offset=0x%08lx found for gid=0x%04lx,"