diff --git a/readline/src/main/java/org/aesh/readline/terminal/utils/LinePipedInputStream.java b/readline/src/main/java/org/aesh/readline/terminal/utils/LinePipedInputStream.java index 359756ec..a378317a 100644 --- a/readline/src/main/java/org/aesh/readline/terminal/utils/LinePipedInputStream.java +++ b/readline/src/main/java/org/aesh/readline/terminal/utils/LinePipedInputStream.java @@ -64,7 +64,7 @@ public synchronized int read(byte[] b, int off, int len) throws IOException { if (available > (len - 1)) { available = len - 1; } - enter = findEnter(buffer, out, (out+available > len-1) ? len-1 : out+available); + enter = findEnter(buffer, out, out+available); if(enter > -1) { if(enter+1 <= available) available = enter+1;