Skip to content

Commit

Permalink
Fix issue with start offset
Browse files Browse the repository at this point in the history
  • Loading branch information
NebelNidas committed Apr 12, 2024
1 parent c837134 commit c1ce391
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ private String read(boolean unescape, boolean consume, boolean stopAtNextCol, @N
}

if (c == '\n' || c == '\r' || (isColumnSeparator && stopAtNextCol && contentCharsRead > -1)) { // stop reading
start = bufferPos + startOffset;
start = bufferPos;
modifiedBufferPos = end;

if (!isColumnSeparator && consume) {
if (!isColumnSeparator && (consume || expected != null)) {
eol = true;
}

Expand Down Expand Up @@ -166,13 +166,11 @@ private String read(boolean unescape, boolean consume, boolean stopAtNextCol, @N
}
}

if (expected != null) {
consume = true;
}

start += startOffset;
String ret;

if (expected != null) {
consume = true;
ret = expected;
} else {
int len = end - start;
Expand Down

0 comments on commit c1ce391

Please sign in to comment.