Author: tilman
Date: Fri Sep 16 16:10:48 2016
New Revision: 1761056

URL: http://svn.apache.org/viewvc?rev=1761056&view=rev
Log:
PDFBOX-3500: catch another bad floating point number, as suggested by Simon 
Gaeremynck

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java

Modified: 
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java
URL: 
http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java?rev=1761056&r1=1761055&r2=1761056&view=diff
==============================================================================
--- 
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java 
(original)
+++ 
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java 
Fri Sep 16 16:10:48 2016
@@ -60,10 +60,11 @@ public class COSFloat extends COSNumber
         }
         catch( NumberFormatException e )
         {
-            if (aFloat.matches("^0\\.0+\\-\\d+"))
+            if (aFloat.matches("^0\\.0*\\-\\d+"))
             {
                 // PDFBOX-2990 has 0.00000-33917698
                 // PDFBOX-3369 has 0.00-35095424
+                // PDFBOX-3500 has 0.-262
                 try
                 {
                     valueAsString = "-" + valueAsString.replaceFirst("\\-", 
"");


Reply via email to