* src/type1/t1afm.c (afm_atoindex): Fix boundary test. Reported by Dirck Blaskey.
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
diff --git a/ChangeLog b/ChangeLog
index 7d50f0c..e7ccf7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-25 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1afm.c (afm_atoindex): Fix boundary test. Reported
+ by Dirck Blaskey.
+
2004-06-24 David Turner <david@freetype.org>
* src/truetype/ttgload.c, src/truetype/ttxgvar.c: removing
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 9945ebd..65d86fa 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -63,13 +63,13 @@
/* skip whitespace */
- while ( ( *p == ' ' || *p == '\t' || *p == ':' || *p == ';' ) &&
- p < limit )
+ while ( p < limit &&
+ ( *p == ' ' || *p == '\t' || *p == ':' || *p == ';' ) )
p++;
*start = p;
/* now, read glyph name */
- while ( IS_ALPHANUM( *p ) && p < limit )
+ while ( p < limit && IS_ALPHANUM( *p ) )
p++;
len = p - *start;