aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-22 02:23:15 +0800
committerobscuren <geffobscura@gmail.com>2014-07-22 02:23:15 +0800
commiteab0b2a90a3e33d0be4d09cbb99d193ba2219844 (patch)
tree337558902e7558d3588a22bf35704f815cfd754b /ethchain
parent8f91d47bf3c26b850f0f40f79856141087e6ef82 (diff)
parent6774ddaba29ae9e9db5065ce74055297b948adf9 (diff)
downloaddexon-eab0b2a90a3e33d0be4d09cbb99d193ba2219844.tar.gz
dexon-eab0b2a90a3e33d0be4d09cbb99d193ba2219844.tar.zst
dexon-eab0b2a90a3e33d0be4d09cbb99d193ba2219844.zip
Merge branch 'master' into develop
Diffstat (limited to 'ethchain')
-rw-r--r--ethchain/vm.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go
index 9d47f950d..34ecd95b7 100644
--- a/ethchain/vm.go
+++ b/ethchain/vm.go
@@ -506,7 +506,7 @@ func (vm *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
offset := stack.Pop().Int64()
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))))
copy(data, closure.Args[offset:l])