Commit 6f16e18b authored by Noeri Huisman's avatar Noeri Huisman Committed by Petri Hintukainen

Don't increment the program counter after TERMINATE_PL

_resume_from_play_pl() restores the stored pc and increments it by one. This function is also called via _play_stop() when a TERMINATE_PL instruction is executed. The program counter is than incremented once more, wrongly skipping an instruction.
parent 928606d3
......@@ -1058,7 +1058,7 @@ static int _hdmv_step(HDMV_VM *p)
case INSN_PLAY_PL: _play_at(p, dst, -1, -1); break;
case INSN_PLAY_PL_PI: _play_at(p, dst, src, -1); break;
case INSN_PLAY_PL_PM: _play_at(p, dst, -1, src); break;
case INSN_TERMINATE_PL: _play_stop(p); break;
case INSN_TERMINATE_PL: _play_stop(p); inc_pc = 0; break;
case INSN_LINK_PI: _play_at(p, -1, dst, -1); break;
case INSN_LINK_MK: _play_at(p, -1, -1, dst); break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment