summaryrefslogtreecommitdiff
path: root/src/pkg/json/decode.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/decode.go')
-rw-r--r--src/pkg/json/decode.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/json/decode.go b/src/pkg/json/decode.go
index e8da35ace..9295bd2dc 100644
--- a/src/pkg/json/decode.go
+++ b/src/pkg/json/decode.go
@@ -304,6 +304,9 @@ func (d *decodeState) array(v reflect.Value) {
av, ok := v.(reflect.ArrayOrSliceValue)
if !ok {
d.saveError(&UnmarshalTypeError{"array", v.Type()})
+ d.off--
+ d.next()
+ return
}
sv, _ := v.(*reflect.SliceValue)