shithub: freetype+ttf2subf

Download patch

ref: c7597edb6ac7c64064b74f78f314007ce9579f3a
parent: 0a263a8b3130c0156a9851f1224a63938be0adef
author: Werner Lemberg <[email protected]>
date: Thu Nov 27 16:55:20 EST 2008

* src/cff/cffparse.c (cff_parse_real): Handle more than nine
significant digits correctly.  This fixes Savannah bug #24953.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-27  Werner Lemberg  <[email protected]>
+
+	* src/cff/cffparse.c (cff_parse_real): Handle more than nine
+	significant digits correctly.  This fixes Savannah bug #24953.
+
 2008-11-25  Daniel Zimmermann  <[email protected]>
 
 	* src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -355,6 +355,12 @@
       if ( FT_ABS( integer_length ) > 5 )
         goto Exit;
 
+      /* Remove non-significant digits. */
+      if ( integer_length < 0 ) {
+        number          /= power_tens[-integer_length];
+        fraction_length += integer_length;
+      }
+
       /* Convert into 16.16 format. */
       if ( fraction_length > 0 )
       {