fix slice unpack bug in accounts/abi (#18321)

* fix slice unpack bug in accounts/abi
This commit is contained in:
weimumu
2018-12-17 16:50:52 +08:00
committed by Guillaume Ballet
parent 7dbb075c07
commit 3ad73443c7
2 changed files with 6 additions and 1 deletions

View File

@ -151,7 +151,7 @@ func forEachUnpack(t Type, output []byte, start, size int) (interface{}, error)
// Arrays have packed elements, resulting in longer unpack steps.
// Slices have just 32 bytes per element (pointing to the contents).
elemSize := 32
if t.T == ArrayTy {
if t.T == ArrayTy || t.T == SliceTy {
elemSize = getFullElemSize(t.Elem)
}