diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-23 18:36:47 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-23 18:36:47 +0800 |
commit | 958b482ada677028e11698c219ed5b1e70b224e6 (patch) | |
tree | 2d517cb19ba0de081022fc4537fa7bc2dfbcba14 /ethvm/vm.go | |
parent | 5d57b7847105639efe1945e1ff588b1116a11a54 (diff) | |
download | dexon-958b482ada677028e11698c219ed5b1e70b224e6.tar.gz dexon-958b482ada677028e11698c219ed5b1e70b224e6.tar.zst dexon-958b482ada677028e11698c219ed5b1e70b224e6.zip |
div 0 err
Diffstat (limited to 'ethvm/vm.go')
-rw-r--r-- | ethvm/vm.go | 4 |
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 |