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

fix csv test

This commit is contained in:
Alexander Medvednikov 2019-12-08 01:03:35 +03:00
parent 7069cd6ab5
commit 30fc29fa6d

View File

@ -124,16 +124,16 @@ fn (r mut Reader) read_record() ?[]string {
// quoted
else {
line = line[1..]
if i := line.index('"') {
if i+1 == line.len {
if j := line.index('"') {
if j+1 == line.len {
// last record
fields << line[..i]
fields << line[..j]
break
}
next := line[i+1]
next := line[j+1]
if next == r.delimiter {
fields << line[..i]
line = line[i..]
fields << line[..j]
line = line[j..]
continue
}
}