Mercurial > otakunoraifu
changeset 15:38226842bac8
Fixed new_pt in global calls
author | thib |
---|---|
date | Mon, 11 Aug 2008 15:52:41 +0000 |
parents | 8da1d92ac8f8 |
children | 92765a5661f7 |
files | scn2k/scn2k_impl.cc |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scn2k/scn2k_impl.cc +++ b/scn2k/scn2k_impl.cc @@ -535,14 +535,14 @@ void Scn2k::SysExec(Cmd& cmd) { if (cmd.cmd1 == 0 && cmd.cmd2 == 1) { if (cmd.cmd3 == 0x0b) { // global jump int call_no = 0; - if (cmd.args.size() >= 2) call_no = cmd.args[1].value; + if (cmd.args.size() >= 2) call_no = cmd.args[1].value; eprintf("global jump to %d\n",cmd.args[0].value); if (! ChangeScript(cmd.args[0].value, call_no)) return; // 読み込めない; abort. cmd.clear(); } else if (cmd.cmd3 == 0x0c || cmd.cmd3 == 0x12) { // call (0x12 の方は微妙) int new_scn = cmd.args[0].value; int new_pt = 0; - if (cmd.args.size() >= 1) { // subroutine number が付く + if (cmd.args.size() >= 2) { // subroutine number が付く // 引数が付くのもあるらしい new_pt = cmd.args[1].value; }