Commit eba3eeecd9578bd6217d276cb1b715d77ecaab87

Werner Lemberg 2008-08-04T15:54:24

* src/cff/cffparse.c (cff_parse_fixed_scaled): Fix thinko which resulted in incorrect scaling. This fixes Savannah bug #23973.

diff --git a/ChangeLog b/ChangeLog
index 7bf3f72..97504f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-04  Bram Tassyns  <bramt@enfocus.be>
+
+	* src/cff/cffparse.c (cff_parse_fixed_scaled): Fix thinko which
+	resulted in incorrect scaling.  This fixes Savannah bug #23973.
+
 2008-08-04  Werner Lemberg  <wl@gnu.org>
 
 	Be more tolerant w.r.t. invalid entries in SFNT table directory.
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index d6d77dd..7347bdb 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -406,10 +406,9 @@
   cff_parse_fixed_scaled( FT_Byte**  d,
                           FT_Int     scaling )
   {
-    return **d ==
-      30 ? cff_parse_real( d[0], d[1], scaling, NULL )
-         : (FT_Fixed)FT_MulFix( cff_parse_integer( d[0], d[1] ) << 16,
-                                                   power_tens[scaling] );
+    return **d == 30 ? cff_parse_real( d[0], d[1], scaling, NULL )
+                     : ( cff_parse_integer( d[0], d[1] ) *
+                           power_tens[scaling] ) << 16;
   }