summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2009-07-03 18:01:41 +0900
committersuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2009-07-03 18:01:41 +0900
commitd5867413abe560c62bff5ce904cc7f66a82c59ea (patch)
treecf70818bc918c5ca0f6aa950e398c496e76bc848
parent6c2176b86fd2e0bf22ae990ab787f6db1e518a2c (diff)
downloadfreetype2-d5867413abe560c62bff5ce904cc7f66a82c59ea.tar.gz
autofit: Cast FT_Long glyph_count to compare with FT_UInt GID.
-rw-r--r--ChangeLog9
-rw-r--r--src/autofit/afglobal.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5adf02ade..9c6f031f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2009-07-03 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-03 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 01f5b1e79..ac293619d 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;