Skip to content

Commit

Permalink
fix panic in csv parser (#3339)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed May 9, 2022
1 parent b9ca088 commit ba44bfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polars/polars-io/src/csv_core/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ where
Some(value) => self.append_value(value),
None => {
// try again without whitespace
if is_whitespace(bytes[0]) {
if !bytes.is_empty() && is_whitespace(bytes[0]) {
let bytes = skip_whitespace(bytes);
return self.parse_bytes(bytes, ignore_errors, needs_escaping);
}
Expand Down

0 comments on commit ba44bfd

Please sign in to comment.