Skip to content

Commit e3d782a

Browse files
committed
Revert "removed faulty check"
This reverts commit 5209b61.
1 parent be061dd commit e3d782a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/zero_allocs/slice.zig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@ pub const FieldParser = struct {
347347
self.err = CsvReadError.UnexpectedEndOfFile;
348348
return null;
349349
}
350+
351+
if (self._text[self._text.len - 1] == cr) {
352+
self.err = CsvReadError.InvalidLineEnding;
353+
return null;
354+
}
350355
}
351356

352357
const expected_end_seps = ((quote_ends << 1) | (self._state.prev_quote_ends >> (chunk_size - 1))) & (~quote_starts);

0 commit comments

Comments
 (0)