autofit: Cast FT_Long glyph_count to compare with FT_UInt GID.
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
diff --git a/ChangeLog b/ChangeLog
index e1eadc8..b115e82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ autofit: Cast FT_Long glyph_count to compare with FT_UInt GID.
+
+ * src/autofit/afglobal.c (af_face_globals_is_digit,
+ af_face_globals_compute_script_coverage): Cast FT_Long
+ globals->glyph_count to FT_ULong, to compare with FT_UInt
+ gindex.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
smooth: Exclude 16-bit system in invalid pitch/height check.
* src/smooth/ftsmooth.c (ft_smooth_render_generic):
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 01f5b1e..ac29361 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -152,7 +152,7 @@
FT_UInt gindex = FT_Get_Char_Index( face, i );
- if ( gindex != 0 && gindex < globals->glyph_count )
+ if ( gindex != 0 && gindex < (FT_ULong)globals->glyph_count )
gscripts[gindex] |= AF_DIGIT;
}
@@ -310,7 +310,7 @@
af_face_globals_is_digit( AF_FaceGlobals globals,
FT_UInt gindex )
{
- if ( gindex < globals->glyph_count )
+ if ( gindex < (FT_ULong)globals->glyph_count )
return (FT_Bool)( globals->glyph_scripts[gindex] & AF_DIGIT );
return (FT_Bool)0;