@@ -78,7 +78,7 @@ func (arguments Arguments) isTuple() bool {
7878// Unpack performs the operation hexdata -> Go format.
7979func (arguments Arguments ) Unpack (data []byte ) ([]interface {}, error ) {
8080 if len (data ) == 0 {
81- if len (arguments ) != 0 {
81+ if len (arguments . NonIndexed () ) != 0 {
8282 return nil , fmt .Errorf ("abi: attempting to unmarshall an empty string while arguments are expected" )
8383 }
8484 return make ([]interface {}, 0 ), nil
@@ -93,7 +93,7 @@ func (arguments Arguments) UnpackIntoMap(v map[string]interface{}, data []byte)
9393 return fmt .Errorf ("abi: cannot unpack into a nil map" )
9494 }
9595 if len (data ) == 0 {
96- if len (arguments ) != 0 {
96+ if len (arguments . NonIndexed () ) != 0 {
9797 return fmt .Errorf ("abi: attempting to unmarshall an empty string while arguments are expected" )
9898 }
9999 return nil // Nothing to unmarshal, return
@@ -115,8 +115,8 @@ func (arguments Arguments) Copy(v interface{}, values []interface{}) error {
115115 return fmt .Errorf ("abi: Unpack(non-pointer %T)" , v )
116116 }
117117 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" )
120120 }
121121 return nil // Nothing to copy, return
122122 }
0 commit comments