Skip to content

Commit d284e3a

Browse files
mirasraelslgmirasrael
authored andcommitted
Fix eol checking for read array in ExtendedBufferedReader
1 parent abfdf83 commit d284e3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public int read(final char[] buf, final int offset, final int length) throws IOE
164164
for (int i = offset; i < offset + len; i++) {
165165
final char ch = buf[i];
166166
if (ch == LF) {
167-
if (CR != (i > 0 ? buf[i - 1] : lastChar)) {
167+
if (CR != (i > offset ? buf[i - 1] : lastChar)) {
168168
eolCounter++;
169169
}
170170
} else if (ch == CR) {

0 commit comments

Comments
 (0)