accounts/abi: update array length after parsing array (#15618)
Fixes #15617
This commit is contained in:
committed by
Felix Lange
parent
ce823c9f84
commit
da58afcea0
@ -71,14 +71,16 @@ func (e Event) tupleUnpack(v interface{}, output []byte) error {
|
||||
if input.Indexed {
|
||||
// can't read, continue
|
||||
continue
|
||||
} else if input.Type.T == ArrayTy {
|
||||
// need to move this up because they read sequentially
|
||||
j += input.Type.Size
|
||||
}
|
||||
marshalledValue, err := toGoType((i+j)*32, input.Type, output)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if input.Type.T == ArrayTy {
|
||||
// combined index ('i' + 'j') need to be adjusted only by size of array, thus
|
||||
// we need to decrement 'j' because 'i' was incremented
|
||||
j += input.Type.Size - 1
|
||||
}
|
||||
reflectValue := reflect.ValueOf(marshalledValue)
|
||||
|
||||
switch value.Kind() {
|
||||
|
Reference in New Issue
Block a user