Commit 2b6a3f0be9cebf4881710f1d238bdb062f19f548

suzuki toshiya 2009-08-01T00:37:59

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

diff --git a/ChangeLog b/ChangeLog
index 8571ae1..6b11600 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2009-07-31  suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
 
+	sfnt: Cast a charcode to 32-bit in cmap format 14 parser.
+	
+	* src/sfnt/ttcmap.c (tt_cmap14_char_var_index,
+	tt_cmap14_char_var_isdefault, tt_cmap14_char_variants,
+	tt_cmap14_variant_chars): Correct mismatches from
+	FT_CMap_CharVarIndexFunc prototype, FT_ULong arguments
+	are replaced by FT_UInt32 arguments.
+
+2009-07-31  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):
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 6bae57b..26ea83c 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -2964,10 +2964,10 @@
 
 
   FT_CALLBACK_DEF( FT_UInt )
-  tt_cmap14_char_var_index( TT_CMap   cmap,
-                            TT_CMap   ucmap,
-                            FT_ULong  charcode,
-                            FT_ULong  variantSelector)
+  tt_cmap14_char_var_index( TT_CMap    cmap,
+                            TT_CMap    ucmap,
+                            FT_UInt32  charcode,
+                            FT_UInt32  variantSelector)
   {
     FT_Byte*  p = tt_cmap14_find_variant( cmap->data + 6, variantSelector );
     FT_ULong  defOff;
@@ -2997,9 +2997,9 @@
 
 
   FT_CALLBACK_DEF( FT_Int )
-  tt_cmap14_char_var_isdefault( TT_CMap   cmap,
-                                FT_ULong  charcode,
-                                FT_ULong  variantSelector )
+  tt_cmap14_char_var_isdefault( TT_CMap    cmap,
+                                FT_UInt32  charcode,
+                                FT_UInt32  variantSelector )
   {
     FT_Byte*  p = tt_cmap14_find_variant( cmap->data + 6, variantSelector );
     FT_ULong  defOff;
@@ -3054,7 +3054,7 @@
   FT_CALLBACK_DEF( FT_UInt32 * )
   tt_cmap14_char_variants( TT_CMap    cmap,
                            FT_Memory  memory,
-                           FT_ULong   charCode )
+                           FT_UInt32  charCode )
   {
     TT_CMap14   cmap14 = (TT_CMap14)  cmap;
     FT_UInt32   count  = cmap14->num_selectors;
@@ -3174,7 +3174,7 @@
   FT_CALLBACK_DEF( FT_UInt32 * )
   tt_cmap14_variant_chars( TT_CMap    cmap,
                            FT_Memory  memory,
-                           FT_ULong   variantSelector )
+                           FT_UInt32  variantSelector )
   {
     FT_Byte    *p  = tt_cmap14_find_variant( cmap->data + 6,
                                              variantSelector );