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:
Emil Hessman 2014-01-03 10:13:28 -08:00 committed by Brad Fitzpatrick
parent d180579170
commit 880442f110
2 changed files with 18 additions and 2 deletions

View file

@ -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)
}