diff options
Diffstat (limited to 'src/pkg/json/struct.go')
-rw-r--r-- | src/pkg/json/struct.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/json/struct.go b/src/pkg/json/struct.go index 3fcf00e89..d94988b64 100644 --- a/src/pkg/json/struct.go +++ b/src/pkg/json/struct.go @@ -154,7 +154,7 @@ func (b *structBuilder) Elem(i int) Builder { return &structBuilder{val: v.Elem(i)} } case *reflect.SliceValue: - if i > v.Cap() { + if i >= v.Cap() { n := v.Cap(); if n < 8 { n = 8 |