Author: tilman
Date: Fri Sep 16 16:08:38 2016
New Revision: 1761055

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

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java?rev=1761055&r1=1761054&r2=1761055&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java 
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java Fri 
Sep 16 16:08:38 2016
@@ -61,10 +61,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