From 1ea2bab9e81a94cb1d62dc25e6e680448650788b Mon Sep 17 00:00:00 2001 From: laurentu Date: Thu, 8 Aug 2024 15:01:39 +0200 Subject: [PATCH] =?UTF-8?q?petit=20bug=20sur=20les=20lignes=20de=201=20car?= =?UTF-8?q?act=C3=A8re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- csvparser.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/csvparser.go b/csvparser.go index c275894..20a7fee 100644 --- a/csvparser.go +++ b/csvparser.go @@ -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 {