Skip to content

Commit

Permalink
ForceMoveRoute: Handle invalid move frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry authored and fmatthew5876 committed Oct 17, 2018
1 parent 22e8b44 commit 6531d3e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game_interpreter.cpp
Expand Up @@ -2327,6 +2327,12 @@ bool Game_Interpreter::CommandMoveEvent(RPG::EventCommand const& com) { // code

RPG::MoveRoute route;
int move_freq = com.parameters[1];

if (move_freq <= 0 || move_freq > 8) {
// Invalid values
move_freq = 6;
}

route.repeat = com.parameters[2] != 0;
route.skippable = com.parameters[3] != 0;

Expand Down

0 comments on commit 6531d3e

Please sign in to comment.