pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1719796 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java
Date Sun, 13 Dec 2015 12:03:32 GMT
Author: lehmi
Date: Sun Dec 13 12:03:31 2015
New Revision: 1719796

URL: http://svn.apache.org/viewvc?rev=1719796&view=rev
Log:
PDFBOX-3151: reformatting

Modified:
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java?rev=1719796&r1=1719795&r2=1719796&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java Sun Dec 13 12:03:31
2015
@@ -34,11 +34,11 @@ public class CMap
     private String cmapName = null;
     private String cmapVersion = null;
     private int cmapType = -1;
-    
+
     private String registry = null;
     private String ordering = null;
     private int supplement = 0;
-    
+
     private int minCodeLength = 4;
     private int maxCodeLength;
 
@@ -119,9 +119,9 @@ public class CMap
                     return toInt(bytes, byteCount);
                 }
             }
-            if (i+1 < maxCodeLength)
+            if (byteCount < maxCodeLength)
             {
-                bytes[i+1] = (byte)in.read();
+                bytes[byteCount] = (byte)in.read();
             }
         }
 
@@ -211,7 +211,7 @@ public class CMap
         }
         return 0;
     }
-    
+
     /**
      * Convert the given part of a byte array to an integer.
      * @param data the byte array
@@ -293,12 +293,14 @@ public class CMap
     void useCmap( CMap cmap )
     {
         for (CodespaceRange codespaceRange : cmap.codespaceRanges)
+        {
             addCodespaceRange(codespaceRange);
+        }
         charToUnicode.putAll(cmap.charToUnicode);
         codeToCid.putAll(cmap.codeToCid);
         codeToCidRanges.addAll(cmap.codeToCidRanges);
     }
-    
+
     /**
      * Returns the WMode of a CMap.
      *



Mime
View raw message