diff options
Diffstat (limited to 'FICS/gamedb.c')
-rw-r--r-- | FICS/gamedb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c index e436cab..27c7d6c 100644 --- a/FICS/gamedb.c +++ b/FICS/gamedb.c @@ -88,9 +88,11 @@ PRIVATE char gameString[GAME_STRING_LEN]; PRIVATE int get_empty_slot(void) { - for (int i = 0; i < g_num; i++) { - if (garray[i].status == GAME_EMPTY) - return i; + if (garray != NULL) { + for (int i = 0; i < g_num; i++) { + if (garray[i].status == GAME_EMPTY) + return i; + } } g_num++; |