aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/vm.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/vm.go')
-rw-r--r--ethchain/vm.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go
index 528088a49..07e9a0f2c 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