accounts/abi/bind: fix multi-value anonymous unmarshalling

This commit is contained in:
Péter Szilágyi
2016-05-12 16:28:18 +03:00
parent 25931f12c1
commit cc21706c50
2 changed files with 37 additions and 3 deletions

View File

@ -211,7 +211,7 @@ package {{.Package}}
{{range $i, $_ := .Normalized.Outputs}}ret{{$i}} = new({{bindtype .Type}})
{{end}}
){{end}}
out := {{if .Structured}}ret{{else}}{{if eq (len .Normalized.Outputs) 1}}ret0{{else}}[]interface{}{
out := {{if .Structured}}ret{{else}}{{if eq (len .Normalized.Outputs) 1}}ret0{{else}}&[]interface{}{
{{range $i, $_ := .Normalized.Outputs}}ret{{$i}},
{{end}}
}{{end}}{{end}}