shithub: freetype+ttf2subf

Download patch

ref: 49079ce297c1698139456d0d3664bf32674d0ee5
parent: 9159128a9297710071e28b24e3cbd29b7a475ebc
author: Werner Lemberg <wl@gnu.org>
date: Wed May 29 04:08:53 EDT 2019

[truetype] Fix 32bit builds (#56404).

Patch suggested by Ben Wagner <bungeman@google.com>.

* src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove
harmful cast to unsigned type.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2019-05-29  Werner Lemberg  <wl@gnu.org>
+
+	[truetype] Fix 32bit builds (#56404).
+
+	Patch suggested by Ben Wagner <bungeman@google.com>.
+
+	* src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove
+	harmful cast to unsigned type.
+
 2019-05-26  Ben Wagner  <bungeman@google.com>
 
 	* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy.
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -72,12 +72,12 @@
           ( (FT_Fixed)( (FT_ULong)(x) << 2 ) )
 #define FT_intToFixed( i )                      \
           ( (FT_Fixed)( (FT_ULong)(i) << 16 ) )
-#define FT_fdot6ToFixed( i )                      \
+#define FT_fdot6ToFixed( i )                    \
           ( (FT_Fixed)( (FT_ULong)(i) << 10 ) )
-#define FT_fixedToInt( x )                                    \
-          ( (FT_Short)( ( (FT_ULong)(x) + 0x8000U ) >> 16 ) )
-#define FT_fixedToFdot6( x )                              \
-          ( (FT_Pos)( ( (FT_ULong)(x) + 0x200 ) >> 10 ) )
+#define FT_fixedToInt( x )                          \
+          ( (FT_Short)( ( (x) + 0x8000U ) >> 16 ) )
+#define FT_fixedToFdot6( x )                    \
+          ( (FT_Pos)( ( (x) + 0x200 ) >> 10 ) )
 
 
   /**************************************************************************