shithub: freetype+ttf2subf

Download patch

ref: b112fa41907710113aa63cbe3434f12f54096163
parent: cbcf33d1d9dfd0db7a3cd013b5870da1366a65c6
author: Werner Lemberg <[email protected]>
date: Sun May 12 03:29:04 EDT 2013

Fix Savannah bug #38967.

* src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2013-05-12  Werner Lemberg  <[email protected]>
 
+	Fix Savannah bug #38967.
+
+	* src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
+
+2013-05-12  Werner Lemberg  <[email protected]>
+
 	Introduce unsigned 64bit type (if available).
 
 	* include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -264,7 +264,7 @@
       q = 0x7FFFFFFFL;
     else
       /* compute result directly */
-      q = (FT_UInt32)( ( ( (FT_ULong)a << 16 ) + ( b >> 1 ) ) / b );
+      q = (FT_UInt32)( ( ( (FT_UInt64)a << 16 ) + ( b >> 1 ) ) / b );
 
     return ( s < 0 ? -(FT_Long)q : (FT_Long)q );
   }