Skip to content

Commit a2e0cf2

Browse files
committed
Erase Event - propper conditions to avoid running useless code
1 parent e56b7a1 commit a2e0cf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/game_interpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3854,7 +3854,7 @@ bool Game_Interpreter::CommandEraseEvent(lcf::rpg::EventCommand const& com) { //
38543854
int event_id = 0; // default rm values
38553855
bool is_active = 0; // In Vanilla RM event is always itself and it always becomes inactive
38563856

3857-
if (Player::IsPatchManiac()) {
3857+
if (Player::IsPatchManiac() && com.parameters.size() >= 3) {
38583858
event_id = ValueOrVariableBitfield(com.parameters[0], 1, com.parameters[2]);
38593859
is_active = com.parameters[1];
38603860
}

0 commit comments

Comments
 (0)