fix csv test

pull/3009/head
Alexander Medvednikov 2019-12-08 01:03:35 +03:00
parent 7069cd6ab5
commit 30fc29fa6d
1 changed files with 6 additions and 6 deletions

View File

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