diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2016-09-19 16:27:40 +0200 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@google.com> | 2016-09-19 16:27:40 +0200 |
| commit | 91eb1b922fd95bfaa5d8b0aad16902a73f3fe3d1 (patch) | |
| tree | bb770659ea65ffb92a2f2763a068bff9343b21c9 /prog/encodingexec.go | |
| parent | b537661a8f865647f33655b4d4592060a5d5c3ca (diff) | |
prog: skip union when calculating field offset
Diffstat (limited to 'prog/encodingexec.go')
| -rw-r--r-- | prog/encodingexec.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/prog/encodingexec.go b/prog/encodingexec.go index 2424a1caa..6ba68b37e 100644 --- a/prog/encodingexec.go +++ b/prog/encodingexec.go @@ -39,7 +39,7 @@ func (p *Prog) SerializeForExec() []byte { for _, c := range p.Calls { // Calculate arg offsets within structs. foreachArg(c, func(arg, base *Arg, _ *[]*Arg) { - if base == nil || arg.Kind == ArgGroup { + if base == nil || arg.Kind == ArgGroup || arg.Kind == ArgUnion { return } if w.args[base] == nil { |
