aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-07-22 18:16:09 +0800
committerMaran <maran.hidskes@gmail.com>2014-07-22 18:16:09 +0800
commit9c86e99968b0756a689a4100231117e5e2211127 (patch)
tree337558902e7558d3588a22bf35704f815cfd754b
parent8f91d47bf3c26b850f0f40f79856141087e6ef82 (diff)
parent6774ddaba29ae9e9db5065ce74055297b948adf9 (diff)
downloadgo-tangerine-9c86e99968b0756a689a4100231117e5e2211127.tar.gz
go-tangerine-9c86e99968b0756a689a4100231117e5e2211127.tar.zst
go-tangerine-9c86e99968b0756a689a4100231117e5e2211127.zip
Merge branch 'master' into develop
-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])