Author: toad
Date: 2007-09-14 14:20:04 +0000 (Fri, 14 Sep 2007)
New Revision: 15158

Modified:
   trunk/freenet/src/freenet/support/io/LineReadingInputStream.java
Log:
Need one extra byte

Modified: trunk/freenet/src/freenet/support/io/LineReadingInputStream.java
===================================================================
--- trunk/freenet/src/freenet/support/io/LineReadingInputStream.java    
2007-09-14 14:05:31 UTC (rev 15157)
+++ trunk/freenet/src/freenet/support/io/LineReadingInputStream.java    
2007-09-14 14:20:04 UTC (rev 15158)
@@ -23,7 +23,7 @@
         */
        public String readLine(int maxLength, int bufferSize, boolean utf) 
throws IOException {
                if(maxLength < bufferSize)
-                       bufferSize = maxLength;
+                       bufferSize = maxLength + 1;
                if(buf == null)
                        buf = new byte[Math.max(Math.min(128,maxLength), 
Math.min(1024, bufferSize))];
                int ctr = 0;


Reply via email to