1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

csv: handle missing line ending

This commit is contained in:
sambeckingham
2020-04-20 23:02:55 +01:00
committed by GitHub
parent 67a76cee1e
commit 4ea4d1c8c4
4 changed files with 136 additions and 45 deletions

View File

@@ -77,6 +77,9 @@ fn (r mut Reader) read_line() ?string {
// no valid line endings found
return err_invalid_le
}
} else {
// No line ending on file
i = r.data.len-1
}
}
mut line := r.data[r.row_pos..i]