comparison src/libmlk-core/core/game.c @ 400:4fb0ce06a43a

core: fix invalid use of game.states
author David Demelier <markand@malikania.fr>
date Wed, 16 Mar 2022 13:32:15 +0100
parents ef4d4a51aeb7
children 3edda1ce314c
comparison
equal deleted inserted replaced
399:77f843de956c 400:4fb0ce06a43a
129 } 129 }
130 130
131 void 131 void
132 game_quit(void) 132 game_quit(void)
133 { 133 {
134 for (size_t i = 0; i < UTIL_SIZE(game.states); ++i) { 134 for (size_t i = 0; i < game.statesz; ++i) {
135 if (game.states[i]) 135 if (game.states[i])
136 state_finish(game.states[i]); 136 state_finish(game.states[i]);
137 137
138 game.states[i] = NULL; 138 game.states[i] = NULL;
139 } 139 }