diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2016-09-19 16:33:32 +0200 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@google.com> | 2016-09-19 16:33:32 +0200 |
| commit | 36d9371a19f15ff74081b908a52a2fc8a4d7a641 (patch) | |
| tree | 89ef906affb8246c7c5467113eea543a27a5214a | |
| parent | 91eb1b922fd95bfaa5d8b0aad16902a73f3fe3d1 (diff) | |
prog: return struct size when generating args
| -rw-r--r-- | prog/rand.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/prog/rand.go b/prog/rand.go index b359748ea..97033b434 100644 --- a/prog/rand.go +++ b/prog/rand.go @@ -790,7 +790,8 @@ func (r *randGen) generateArg(s *state, typ sys.Type, dir ArgDir, sizes map[stri return } args, calls := r.generateArgs(s, a.Fields, dir) - return groupArg(args), nil, calls + group := groupArg(args) + return group, constArg(group.Size(a)), calls case *sys.UnionType: optType := a.Options[r.Intn(len(a.Options))] opt, size, calls := r.generateArg(s, optType, dir, sizes) |
