sfnt: Cast a charcode to 32-bit in cmap format 12 parser.

This commit is contained in:
suzuki toshiya 2009-07-03 18:01:44 +09:00
parent 988838f9d8
commit 7a726cb2b9
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
sfnt: Cast a charcode to 32-bit in cmap format 12 parser.
* src/sfnt/ttcmap.c (tt_cmap12_char_next):
Insert explicit cast from FT_UFast to FT_UInt32
for return value.
2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
psaux: Fix a few casts to FT_Int32 value.

View File

@ -2228,8 +2228,10 @@
if ( cmap12->valid )
{
gindex = cmap12->cur_gindex;
/* XXX: check cur_charcode overflow is expected */
if ( gindex )
*pchar_code = cmap12->cur_charcode;
*pchar_code = (FT_UInt32)cmap12->cur_charcode;
}
else
gindex = 0;
@ -2237,7 +2239,8 @@
else
gindex = tt_cmap12_char_map_binary( cmap, pchar_code, 1 );
return gindex;
/* XXX: check gindex overflow is expected */
return (FT_UInt32)gindex;
}