From a10d2b7cf53325753f73adaace8d1ed5f42b0a70 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 4 Dec 2007 22:05:54 +0000 Subject: [PATCH] * src/cff/cffload.c (cff_subfont_load): Don't use logical OR to concatenate error codes. * src/sfnt/ttsbit.c (Load_SBit_Range): Ditto. --- ChangeLog | 6 ++++++ src/cff/cffload.c | 5 +++-- src/sfnt/ttsbit.c | 5 +++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 925f13f6..7b07c41a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-04 Werner Lemberg + + * 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 * 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 242c06a3..4a75446b 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 eff49dad..8261ba55 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: