From cf2882c2e754f49c46ce2ca12c3ca07e4cabc459 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Wed, 12 Nov 2025 00:32:15 +0100 Subject: Fix prev_op Assigning prev_op inside nwp_execute defeated the purpose because this function is meant to start the state machine for the given instruction. In other words, inspecting prev_op would in fact return the current opcode, instead of the previous opcode. --- src/interp/resume.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/interp/resume.c') diff --git a/src/interp/resume.c b/src/interp/resume.c index cf9ece2..2494928 100644 --- a/src/interp/resume.c +++ b/src/interp/resume.c @@ -13,6 +13,8 @@ void nwp_interp_resume(struct nw_interp *const i) { + i->fr.prev_op = i->fr.op; + if (i->set) nwp_interp_limited(i); else -- cgit v1.2.3