pcf: Fix some data types mismatching with their sources.
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 47 48 49 50 51
diff --git a/ChangeLog b/ChangeLog
index 1e83062..7cb3dd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ pcf: Fix some data types mismatching with their sources.
+
+ * src/pcf/pcfread.c (pcf_seek_to_table_type,
+ pcf_has_table_type): The type of 3rd argument
+ `ntables' is matched with PCF_Toc->count.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
otvalid: Truncate the glyph index to 16-bit.
* src/otvalid/otvalid.c (otv_validate): Checks
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 476ffbd..4ec4db8 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -289,13 +289,13 @@ THE SOFTWARE.
static FT_Error
pcf_seek_to_table_type( FT_Stream stream,
PCF_Table tables,
- FT_Int ntables,
+ FT_ULong ntables, /* same as PCF_Toc->count */
FT_ULong type,
FT_ULong *aformat,
FT_ULong *asize )
{
FT_Error error = PCF_Err_Invalid_File_Format;
- FT_Int i;
+ FT_ULong i;
for ( i = 0; i < ntables; i++ )
@@ -327,10 +327,10 @@ THE SOFTWARE.
static FT_Bool
pcf_has_table_type( PCF_Table tables,
- FT_Int ntables,
+ FT_ULong ntables, /* same as PCF_Toc->count */
FT_ULong type )
{
- FT_Int i;
+ FT_ULong i;
for ( i = 0; i < ntables; i++ )