Commit 82ad8ab242e2d26912251bd98503d9b779b6cb0f

Werner Lemberg 2010-06-26T09:45:41

Fix last PFR change. * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.

diff --git a/ChangeLog b/ChangeLog
index fc02521..2d6403d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-06-26  Werner Lemberg  <wl@gnu.org>
 
+	Fix last PFR change.
+
+	* src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
+
+2010-06-26  Werner Lemberg  <wl@gnu.org>
+
 	Fix Savannah bug #30262.
 
 	* src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index 307e6d3..40b1463 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -146,16 +146,16 @@
           if ( phy_font->chars[nn].gps_offset != 0 )
             break;
 
-        if ( phy_font->num_strikes > 0 )
+        if ( nn == phy_font->num_chars )
         {
-          if ( nn == phy_font->num_chars )
+          if ( phy_font->num_strikes > 0 )
             pfrface->face_flags = 0;        /* not scalable */
-        }
-        else
-        {
-          FT_ERROR(( "pfr_face_init: font doesn't contain glyphs\n" ));
-          error = PFR_Err_Invalid_File_Format;
-          goto Exit;
+          else
+          {
+            FT_ERROR(( "pfr_face_init: font doesn't contain glyphs\n" ));
+            error = PFR_Err_Invalid_File_Format;
+            goto Exit;
+          }
         }
       }