* src/cff/cffload.c (cff_subfont_load): Don't use logical OR to concatenate error codes. * src/sfnt/ttsbit.c (Load_SBit_Range): Ditto.
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
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: