pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1735148 - /pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/cff/Type1CharString.java
Date Tue, 15 Mar 2016 17:32:54 GMT
Author: tilman
Date: Tue Mar 15 17:32:54 2016
New Revision: 1735148

URL: http://svn.apache.org/viewvc?rev=1735148&view=rev
Log:
PDFBOX-3273: round result of int division

Modified:
    pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/cff/Type1CharString.java

Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/cff/Type1CharString.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/cff/Type1CharString.java?rev=1735148&r1=1735147&r2=1735148&view=diff
==============================================================================
--- pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/cff/Type1CharString.java
(original)
+++ pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/cff/Type1CharString.java
Tue Mar 15 17:32:54 2016
@@ -289,7 +289,7 @@ public class Type1CharString
             int b = numbers.get(numbers.size() -1);
             int a = numbers.get(numbers.size() -2);
 
-            int result = a / b; // TODO loss of precision, should be float
+            int result = Math.round(a / (float) b); // TODO loss of precision, result should
be float
 
             List<Integer> list = new ArrayList<Integer>(numbers);
             list.remove(list.size() - 1);



Mime
View raw message