aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/playerdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r--FICS/playerdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index d2c27ec..0bcbcaa 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -63,6 +63,13 @@
PUBLIC player parray[PARRAY_SIZE];
PUBLIC int p_num = 0;
+PUBLIC bool
+player_num_ok_chk(const int num)
+{
+ return (num >= 0 && num <= p_num &&
+ num < (int)ARRAY_SIZE(parray));
+}
+
PRIVATE int
get_empty_slot(void)
{