petit bug sur les lignes de 1 caractère

This commit is contained in:
laurentu 2024-08-08 15:01:39 +02:00
parent 367bd16e42
commit 1ea2bab9e8
1 changed files with 3 additions and 0 deletions

View File

@ -108,6 +108,9 @@ func (p *CsvParser) Parse(line string) (map[string]string, error) {
// current rune is a delimiter, a value is present and the next char is the next value
if isDelimiter || index == maxIndex {
if index == maxIndex && valueStart == -1 {
valueStart = 0
}
state.delimiter = true
field := line[valueStart:index]
if state.enclosed {