aboutsummaryrefslogtreecommitdiffstats
path: root/ethvm/vm.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethvm/vm.go')
-rw-r--r--ethvm/vm.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ethvm/vm.go b/ethvm/vm.go
index 1f0ae8991..e159d8ff1 100644
--- a/ethvm/vm.go
+++ b/ethvm/vm.go
@@ -268,7 +268,9 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
x, y := stack.Popn()
self.Printf(" %v / %v", y, x)
- base.Div(y, x)
+ if x.Cmp(ethutil.Big0) != 0 {
+ base.Div(y, x)
+ }
self.Printf(" = %v", base)
// Pop result back on the stack