aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-07-17 18:11:36 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-07-17 18:11:39 +0200
commitc98c40a47c6f1c522a485d2610e51267541adc52 (patch)
tree07b62efb2f49130050bbcfccb2e7beec4930c439
parent38d8d13a0c06626caf6ed8d9425f57afa42e7665 (diff)
Explicitly specified the array size of 'bstr' and 'rstr'
-rw-r--r--FICS/gamedb.c4
-rw-r--r--FICS/gamedb.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c
index b40cd99..064a18a 100644
--- a/FICS/gamedb.c
+++ b/FICS/gamedb.c
@@ -60,7 +60,7 @@
PUBLIC game *garray = NULL;
PUBLIC int g_num = 0;
-PUBLIC const char *bstr[] = {
+PUBLIC const char *bstr[7] = {
[TYPE_UNTIMED] = "untimed",
[TYPE_BLITZ] = "blitz",
[TYPE_STAND] = "standard",
@@ -69,7 +69,7 @@ PUBLIC const char *bstr[] = {
[TYPE_LIGHT] = "lightning",
[TYPE_BUGHOUSE] = "bughouse"
};
-PUBLIC const char *rstr[] = {
+PUBLIC const char *rstr[2] = {
[TYPE_UNRATED] = "unrated",
[TYPE_RATED] = "rated"
};
diff --git a/FICS/gamedb.h b/FICS/gamedb.h
index 5b4ceef..d123028 100644
--- a/FICS/gamedb.h
+++ b/FICS/gamedb.h
@@ -31,8 +31,8 @@
#include "board.h"
-extern const char *bstr[];
-extern const char *rstr[];
+extern const char *bstr[7];
+extern const char *rstr[2];
#define GAMEFILE_VERSION 3
#define MAX_GLINE_SIZE 1024