diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-08-25 07:36:54 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-08-25 07:36:54 +0200 |
| commit | 765f66e909fbfe4b9182e61a08c5078112c5b1a8 (patch) | |
| tree | eadcb306d840422e0896888b0b25f5869e0a553b /lib/vnf | |
| parent | 2177745a72de06285f71df03f7678dfc82bfb01d (diff) | |
| download | tools.nes-765f66e909fbfe4b9182e61a08c5078112c5b1a8.tar.gz tools.nes-765f66e909fbfe4b9182e61a08c5078112c5b1a8.zip | |
Even if the desired thing is to run until the provided address is
reached, abort execution as well if the machine stops being active as
well. This is a common scenario when running in function mode and the
target end address is something passed that.
Fixes: e6c41303c2da ("runrom: add the --until-address option")
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib/vnf')
| -rw-r--r-- | lib/vnf/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vnf/src/lib.rs b/lib/vnf/src/lib.rs index 349548a..fc170f5 100644 --- a/lib/vnf/src/lib.rs +++ b/lib/vnf/src/lib.rs @@ -556,7 +556,7 @@ impl Machine { /// Run until the program counter reaches the given 'address'. pub fn until_address(&mut self, address: u16) -> Result<(), String> { - while self.pc != address as usize { + while self.pc != address as usize && self.active { self.next_iteration()?; } |
