fixed catchup loop when stepping back in instruction quantum

the input loop would be called (and the end of the catchup loop delayed)
on the last cycle of the previous instruction that we want to stop on
This commit is contained in:
JetSetIlly 2023-11-29 16:18:03 +00:00
parent 9b11590fde
commit b10c094f24

View file

@ -93,6 +93,12 @@ func (dbg *Debugger) catchupLoop(inputter terminal.Input) error {
return nil
}
// if quantum if QuantumInstruction and we're not at the end of the
// instruction then we never want to call the input loop
if dbg.Quantum() == govern.QuantumInstruction && !dbg.vcs.CPU.LastResult.Final {
return nil
}
return dbg.inputLoop(inputter, true)
}