shithub: freetype+ttf2subf

Download patch

ref: a4124bf088fbce84bd594d7657ce7c685d1063dd
parent: 370aea802c9ed3b8bd42ce8d1308c44e1487367b
author: Werner Lemberg <[email protected]>
date: Tue Jun 8 05:21:39 EDT 2010

Fix Savannah bug #30053.

* src/cff/cffparse (cff_parse_real): Handle border case where
`fraction_length' has value 10.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-08  Werner Lemberg  <[email protected]>
+
+	Fix Savannah bug #30053.
+
+	* src/cff/cffparse (cff_parse_real): Handle border case where
+	`fraction_length' has value 10.
+
 2010-06-07  Werner Lemberg  <[email protected]>
 
 	Fix Savannah bug #30052.
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -335,6 +335,13 @@
         fraction_length += integer_length;
       }
 
+      /* this can only happen if exponent was non-zero */
+      if ( fraction_length == 10 )
+      {
+        number          /= 10;
+        fraction_length -= 1;
+      }
+
       /* Convert into 16.16 format. */
       if ( fraction_length > 0 )
       {