Fixed invalid access to game state array

This commit is contained in:
MeirGavish
2025-10-21 12:49:02 +03:00
parent 0b848cd72e
commit 9c78094399
+1 -1
View File
@@ -1269,9 +1269,9 @@ void game_change_state(enum GameState new_game_state)
{
timer = TM_ZERO; // Reset the timer
state_info[game_state].substate = 0;
if (game_state >= 0 && game_state < GAME_STATE_MAX)
{
state_info[game_state].substate = 0;
state_info[game_state].on_exit();
}