Commit a10d2b7cf53325753f73adaace8d1ed5f42b0a70

Werner Lemberg 2007-12-04T22:05:54

* src/cff/cffload.c (cff_subfont_load): Don't use logical OR to concatenate error codes. * src/sfnt/ttsbit.c (Load_SBit_Range): Ditto.

diff --git a/ChangeLog b/ChangeLog
index 925f13f..7b07c41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-04  Werner Lemberg  <wl@gnu.org>
+
+	* src/cff/cffload.c (cff_subfont_load): Don't use logical OR to
+	concatenate error codes.
+	* src/sfnt/ttsbit.c (Load_SBit_Range): Ditto.
+
 2007-12-04  Graham Asher  <graham.asher@btinternet.com>
 
 	* src/truetype/ttobjs.c (tt_face_init): Don't use logical OR to
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 242c06a..4a75446 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1272,8 +1272,9 @@
     top->cid_ordering        = 0xFFFFU;
     top->cid_font_name       = 0xFFFFU;
 
-    error = cff_index_access_element( idx, font_index, &dict, &dict_len ) ||
-            cff_parser_run( &parser, dict, dict + dict_len );
+    error = cff_index_access_element( idx, font_index, &dict, &dict_len );
+    if ( !error )
+      error = cff_parser_run( &parser, dict, dict + dict_len );
 
     cff_index_forget_element( idx, &dict );
 
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index eff49da..8261ba5 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -382,8 +382,9 @@
       break;
 
     case 5:
-      error = Load_SBit_Const_Metrics( range, stream )   ||
-              Load_SBit_Range_Codes( range, stream, 0 );
+      error = Load_SBit_Const_Metrics( range, stream );
+      if ( !error )
+        error = Load_SBit_Range_Codes( range, stream, 0 );
       break;
 
     default: