From a28bc4c71d6effcbb2f24734602d971b92ce5475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wu=2C=20Chia-I=20=28=E5=90=B3=E4=BD=B3=E4=B8=80=29?= Date: Wed, 30 Nov 2005 02:39:10 +0000 Subject: [PATCH] * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary, tt_cmap12_char_map_binary): Fix compiler warnings. --- ChangeLog | 5 +++++ src/sfnt/ttcmap.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54693a87a..ea7ce1b16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-30 Chia-I Wu + + * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary, + tt_cmap12_char_map_binary): Fix compiler warnings. + 2005-11-29 Chia-I Wu Major update to distinguish between unsorted and overlapped segments diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c index 2ff6f945e..e20fd7909 100644 --- a/src/sfnt/ttcmap.c +++ b/src/sfnt/ttcmap.c @@ -1044,10 +1044,14 @@ p = cmap->data + 6; num_segs2 = FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 2 ); + if ( !num_segs2 ) + return 0; + num_segs = num_segs2 >> 1; - if ( !num_segs ) - return 0; + /* make compiler happy */ + mid = num_segs; + end = 0xFFFFU; if ( next ) charcode++; @@ -2053,6 +2057,10 @@ if ( !num_groups ) return 0; + /* make compiler happy */ + mid = num_groups; + end = 0xFFFFFFFFUL; + if ( next ) char_code++;