Commit 3b45f564e94fde897c0e6e168c660a6e1ec5c679

Seigo Nonaka 2021-11-29T18:17:49

* src/base/ftobjs.c (FT_Request_Metrics): Fix build warning on Android. Use casts since `FT_USHORT_MAX` is unsigned short in bionic (libc used in Android).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 62475d4..883f1a8 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3230,8 +3230,8 @@
 
       scaled_w = ( scaled_w + 32 ) >> 6;
       scaled_h = ( scaled_h + 32 ) >> 6;
-      if ( scaled_w > FT_USHORT_MAX ||
-           scaled_h > FT_USHORT_MAX )
+      if ( scaled_w > (FT_Long)FT_USHORT_MAX ||
+           scaled_h > (FT_Long)FT_USHORT_MAX )
       {
         FT_ERROR(( "FT_Request_Metrics: Resulting ppem size too large\n" ));
         error = FT_ERR( Invalid_Pixel_Size );