@@ -78,7 +78,7 @@ func (arguments Arguments) isTuple() bool {
78
78
// Unpack performs the operation hexdata -> Go format.
79
79
func (arguments Arguments ) Unpack (data []byte ) ([]interface {}, error ) {
80
80
if len (data ) == 0 {
81
- if len (arguments ) != 0 {
81
+ if len (arguments . NonIndexed () ) != 0 {
82
82
return nil , fmt .Errorf ("abi: attempting to unmarshall an empty string while arguments are expected" )
83
83
}
84
84
return make ([]interface {}, 0 ), nil
@@ -93,7 +93,7 @@ func (arguments Arguments) UnpackIntoMap(v map[string]interface{}, data []byte)
93
93
return fmt .Errorf ("abi: cannot unpack into a nil map" )
94
94
}
95
95
if len (data ) == 0 {
96
- if len (arguments ) != 0 {
96
+ if len (arguments . NonIndexed () ) != 0 {
97
97
return fmt .Errorf ("abi: attempting to unmarshall an empty string while arguments are expected" )
98
98
}
99
99
return nil // Nothing to unmarshal, return
@@ -115,8 +115,8 @@ func (arguments Arguments) Copy(v interface{}, values []interface{}) error {
115
115
return fmt .Errorf ("abi: Unpack(non-pointer %T)" , v )
116
116
}
117
117
if len (values ) == 0 {
118
- if len (arguments ) != 0 {
119
- return fmt .Errorf ("abi: attempting to copy no values while %d arguments are expected" , len ( arguments ) )
118
+ if len (arguments . NonIndexed () ) != 0 {
119
+ return fmt .Errorf ("abi: attempting to copy no values while arguments are expected" )
120
120
}
121
121
return nil // Nothing to copy, return
122
122
}
0 commit comments