aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-23 18:04:45 +0800
committerobscuren <geffobscura@gmail.com>2014-07-23 18:04:45 +0800
commit92b16618edf6bbb6d98659050d8bf0d538285491 (patch)
tree9daacfe6305866439b92fc75fd86632668e61842
parenta3771e7d7b5a648cae12977ffc470460bc1b0e53 (diff)
parent06ec80f39495bdd92878468cf862f52e9748f1ca (diff)
downloadgo-tangerine-92b16618edf6bbb6d98659050d8bf0d538285491.tar
go-tangerine-92b16618edf6bbb6d98659050d8bf0d538285491.tar.gz
go-tangerine-92b16618edf6bbb6d98659050d8bf0d538285491.tar.bz2
go-tangerine-92b16618edf6bbb6d98659050d8bf0d538285491.tar.lz
go-tangerine-92b16618edf6bbb6d98659050d8bf0d538285491.tar.xz
go-tangerine-92b16618edf6bbb6d98659050d8bf0d538285491.tar.zst
go-tangerine-92b16618edf6bbb6d98659050d8bf0d538285491.zip
Merge branch 'master' into develop
-rw-r--r--ethchain/vm.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go
index a9bed1eca..d5f65676c 100644
--- a/ethchain/vm.go
+++ b/ethchain/vm.go
@@ -306,7 +306,9 @@ func (vm *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
x, y := stack.Popn()
vm.Printf(" %v / %v", y, x)
- base.Div(y, x)
+ if x.Cmp(ethutil.Big0) != 0 {
+ base.Div(y, x)
+ }
vm.Printf(" = %v", base)
// Pop result back on the stack