2
0

Fix parsing text array with negative bounds

e.g. '[-4:-2]={1,2,3}'

fixes #132
This commit is contained in:
Jack Christensen
2021-10-30 09:00:48 -05:00
parent b72f8084b5
commit 2caf113f1b
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ func arrayParseInteger(buf *bytes.Buffer) (int32, error) {
return 0, err
}
if '0' <= r && r <= '9' {
if ('0' <= r && r <= '9') || r == '-' {
s.WriteRune(r)
} else {
buf.UnreadRune()