fix(flag): honor full separator length when splitting map key=value pairs

splitKeyVal sliced the value from index+1, skipping only one byte of the
key/value separator. With a multi-character sep tag (e.g. sep:"=>") the
remaining separator bytes leaked into the value. Slice from index+len(sep)
so the whole separator is consumed.
This commit is contained in:
dualfroz committed 2026-09-04 09:31:42 +02:00
1 parent 78a016e843
commit d03cd5d09c
3 files changed
+86 -1

No files matched your search

+1 -1
View File
@@ -436,7 +436,7 @@ func splitKeyVal(s, sep string) (key, val string, err error) {
if index == -1 {
return s, "", nil
}
return s[:index], s[index+1:], nil
return s[:index], s[index+len(sep):], nil
}
func minmaxIntCheck(kind reflect.Kind, v int64) bool {