Skip to content

Commit

Permalink
CommandEndLoop: Fix index
Browse files Browse the repository at this point in the history
After end loop, the next command is not Loop but instead is
the first command inside the loop.
  • Loading branch information
mateofio committed Sep 3, 2019
1 parent 06c059f commit 5d5f55e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3057,6 +3057,11 @@ bool Game_Interpreter::CommandEndLoop(RPG::EventCommand const& com) { // code 22
break;
}

// Jump past the Cmd::Loop to the first command.
if (index < (int)frame->commands.size()) {
++index;
}

return true;
}

Expand Down

0 comments on commit 5d5f55e

Please sign in to comment.