Skip to content

Commit

Permalink
Erase Event - propper conditions to avoid running useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
jetrotal committed Dec 19, 2024
1 parent e56b7a1 commit a2e0cf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3854,7 +3854,7 @@ bool Game_Interpreter::CommandEraseEvent(lcf::rpg::EventCommand const& com) { //
int event_id = 0; // default rm values
bool is_active = 0; // In Vanilla RM event is always itself and it always becomes inactive

if (Player::IsPatchManiac()) {
if (Player::IsPatchManiac() && com.parameters.size() >= 3) {
event_id = ValueOrVariableBitfield(com.parameters[0], 1, com.parameters[2]);
is_active = com.parameters[1];
}
Expand Down

0 comments on commit a2e0cf2

Please sign in to comment.