diff --git a/src/main/java/net/fabricmc/mappingio/format/ColumnFileReader.java b/src/main/java/net/fabricmc/mappingio/format/ColumnFileReader.java index 5adb81a8..06010fb2 100644 --- a/src/main/java/net/fabricmc/mappingio/format/ColumnFileReader.java +++ b/src/main/java/net/fabricmc/mappingio/format/ColumnFileReader.java @@ -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; } @@ -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;