mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
encoding/json: Fix missing error when trying to unmarshal null string into int, for successive ,string option
Fixes #7046. R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/47260043
This commit is contained in:
parent
d180579170
commit
880442f110
2 changed files with 18 additions and 2 deletions
|
|
@ -561,6 +561,7 @@ func (d *decodeState) object(v reflect.Value) {
|
|||
if destring {
|
||||
d.value(reflect.ValueOf(&d.tempstr))
|
||||
d.literalStore([]byte(d.tempstr), subv, true)
|
||||
d.tempstr = "" // Zero scratch space for successive values.
|
||||
} else {
|
||||
d.value(subv)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue