mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 03:26:38 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
eab0b2a90a
1 changed files with 1 additions and 1 deletions
|
|
@ -506,7 +506,7 @@ func (vm *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
|
||||||
offset := stack.Pop().Int64()
|
offset := stack.Pop().Int64()
|
||||||
|
|
||||||
data := make([]byte, 32)
|
data := make([]byte, 32)
|
||||||
if len(closure.Args) >= int(offset) {
|
if big.NewInt(int64(len(closure.Args))).Cmp(big.NewInt(offset)) >= 0 {
|
||||||
l := int64(math.Min(float64(offset+32), float64(len(closure.Args))))
|
l := int64(math.Min(float64(offset+32), float64(len(closure.Args))))
|
||||||
|
|
||||||
copy(data, closure.Args[offset:l])
|
copy(data, closure.Args[offset:l])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue