Actually halt machine when a function returns true
This commit is contained in:
parent
07a783b6ba
commit
7b93b550e5
|
@ -169,7 +169,9 @@ func (machine *Machine) Execute(offset int) {
|
||||||
}
|
}
|
||||||
function, exists := machine.functions[id]
|
function, exists := machine.functions[id]
|
||||||
if exists {
|
if exists {
|
||||||
function(machine)
|
if function(machine) {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
machine.counter++
|
machine.counter++
|
||||||
|
|
Loading…
Reference in New Issue