summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorBrian Cully <bjc@spork.org>2025-12-18 16:26:18 -0500
committerBrian Cully <bjc@spork.org>2025-12-18 16:26:18 -0500
commitd94c46b0866d41057444d5f6fde2a83b52a218c3 (patch)
tree661c77b565aff3a0ae48830d4fcc921ccbab8442 /src/lib.rs
parent4e445322b58f020e73c31ba742dae49fb5c3da1e (diff)
downloadautomathon-d94c46b0866d41057444d5f6fde2a83b52a218c3.tar.gz
automathon-d94c46b0866d41057444d5f6fde2a83b52a218c3.zip
rust: re-use reset_ip
Diffstat (limited to 'src/lib.rs')
-rwxr-xr-xsrc/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 9c89c78..4860ddc 100755
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -106,10 +106,8 @@ impl ExportedVM {
}
pub fn run(&mut self) -> Result<usize, String> {
+ self.reset_ip();
let vm = (&mut self.vm).as_mut().ok_or(Error::NoVM)?;
-
- vm.ip.word = 0;
- vm.ip.offset = 0;
Ok(vm.run()?)
}