mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts/abi: fixed unpacking of no values
This commit is contained in:
parent
ad60f0cec0
commit
ebf0efeeb2
1 changed files with 3 additions and 0 deletions
|
|
@ -107,6 +107,9 @@ func (arguments Arguments) Unpack(v interface{}, data []byte) error {
|
|||
if arguments.isTuple() {
|
||||
return arguments.unpackTuple(v, marshalledValues)
|
||||
}
|
||||
if len(marshalledValues) == 0 {
|
||||
return fmt.Errorf("abi: Unpack(no-values unmarshalled %T)", v)
|
||||
}
|
||||
return arguments.unpackAtomic(v, marshalledValues[0])
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue