The division test was wrong

This commit is contained in:
Sasha Koshka
2022-08-28 19:59:00 -04:00
parent 287d23fe36
commit 884f00d048
2 changed files with 6 additions and 6 deletions

View File

@@ -117,7 +117,7 @@ func (machine *Machine) Execute(offset int) (err error) {
// last word on the stack
left := machine.Pop()
right := machine.Pop()
if left == 0 && right == 0 {
if right == 0 {
err = ErrorDivideByZero
return
}