diff --git a/decoder.go b/decoder.go index 396da75..6e4d7e5 100644 --- a/decoder.go +++ b/decoder.go @@ -602,7 +602,7 @@ func (d *decoder) decodeStruct( } // This fills in embedded structs - for i := range fields.anonymousFields { + for _, i := range fields.anonymousFields { _, err := d.unmarshalMap(size, offset, result.Field(i), depth) if err != nil { return 0, err