segm fault
This commit is contained in:
parent
5fd528e22a
commit
e9785c4906
10 changed files with 226 additions and 58 deletions
|
|
@ -1,13 +1,11 @@
|
|||
#include "01_automato.h"
|
||||
|
||||
static GameState_t g_state = {0};
|
||||
|
||||
GameState_t* get_game_state(void) {
|
||||
static GameInfo_t instance = {0};
|
||||
static int is_init = 0;
|
||||
if (!is_init) {
|
||||
g_state.state = GameOver;
|
||||
is_init = 1;
|
||||
static GameState_t state = {0};
|
||||
static int initialized = 0;
|
||||
if (!initialized) {
|
||||
state.state = GameOver;
|
||||
initialized = 1;
|
||||
}
|
||||
return &g_state;
|
||||
return &state;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue