Added and passed comparison test

This commit is contained in:
Sasha Koshka
2022-08-28 20:13:55 -04:00
parent 884f00d048
commit 0f1285bbb9
2 changed files with 63 additions and 1 deletions

View File

@@ -144,7 +144,7 @@ func (machine *Machine) Execute(offset int) (err error) {
// checks if the last word on the stack is less than the
// second to last word on the stack
less := 0
if machine.Pop() > machine.Pop() {
if machine.Pop() < machine.Pop() {
less = 1
}
machine.Push(less)