]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
This is a better fix which will cater for the case where the first character encounte...
authorAdrian Cumiskey <acumiskey@apache.org>
Tue, 9 Sep 2008 13:35:13 +0000 (13:35 +0000)
committerAdrian Cumiskey <acumiskey@apache.org>
Tue, 9 Sep 2008 13:35:13 +0000 (13:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@693462 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/type1/PFMInputStream.java

index 85f39b6f3aba738ecb9d2c3765d43ecea6aff259..f563059c32684a9d7b5504b94c8a6270447a5cfa 100644 (file)
@@ -100,12 +100,12 @@ public class PFMInputStream extends java.io.FilterInputStream {
         StringBuffer buf = new StringBuffer();
 
         int ch = reader.read();
-        while (ch != 0) {
+        while (ch > 0) {
             buf.append((char)ch);
             ch = reader.read();
-            if (ch == -1) {
-                throw new EOFException("Unexpected end of stream reached");
-            }
+        }
+        if (ch == -1) {
+            throw new EOFException("Unexpected end of stream reached");
         }
         return buf.toString();
     }