From a2e0cf26dc22635080b60c2dbb8a276d1a54f900 Mon Sep 17 00:00:00 2001 From: Mauro Junior <45118493+jetrotal@users.noreply.github.com> Date: Thu, 19 Dec 2024 04:44:49 -0300 Subject: [PATCH] Erase Event - propper conditions to avoid running useless code --- src/game_interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game_interpreter.cpp b/src/game_interpreter.cpp index 6383a8ef33..a75472dd49 100644 --- a/src/game_interpreter.cpp +++ b/src/game_interpreter.cpp @@ -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]; }