Commit c4513d3b authored by Pieter Droogendijk's avatar Pieter Droogendijk Committed by Andrew Gerrand

json: handle capital floating point exponent (1E100).

When parsing numbers with an exponent (like "12e-1"), the JSON scanner
would only allow a lowercase 'e', while the RFC also allows the
uppercase 'E'.

R=adg
CC=golang-dev, rsc
https://golang.org/cl/3986042
parent 850ed709
......@@ -416,7 +416,7 @@ func state0(s *scanner, c int) int {
s.step = stateDot
return scanContinue
}
if c == 'e' {
if c == 'e' || c == 'E' {
s.step = stateE
return scanContinue
}
......@@ -440,7 +440,7 @@ func stateDot0(s *scanner, c int) int {
s.step = stateDot0
return scanContinue
}
if c == 'e' {
if c == 'e' || c == 'E' {
s.step = stateE
return scanContinue
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment