Fixed negative number parsing in snbt and added tests

This commit is contained in:
Nicholas Novak
2021-11-01 09:40:48 -07:00
parent 7b5e289786
commit 5cd290d29e
2 changed files with 7 additions and 3 deletions

View File

@ -115,9 +115,9 @@ func stateBeginValue(s *scanner, c byte) int {
return s.pushParseState(c, parseListValue, scanBeginList)
case '"', '\'': // beginning of TAG_String
return stateBeginString(s, c)
case '-': // beginning of negative number
s.step = stateNeg
return scanBeginLiteral
//case '-': // beginning of negative number
//s.step = stateNeg
//return scanBeginLiteral
default:
if isNumber(c) {
stateNum0(s, c)