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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
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,"