aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/command.c')
-rw-r--r--FICS/command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/FICS/command.c b/FICS/command.c
index d1f627e..b3f4e29 100644
--- a/FICS/command.c
+++ b/FICS/command.c
@@ -1089,6 +1089,9 @@ process_input(int fd, char *com_string)
if (p < 0) {
fprintf(stderr, "FICS: Input from a player not in array!\n");
return -1;
+ } else if (com_string == NULL) {
+ fprintf(stderr, "FICS: Command string is NULL!\n");
+ return -1;
}
commanding_player = p;
@@ -1107,7 +1110,7 @@ process_input(int fd, char *com_string)
case PLAYER_LOGIN:
retval = process_login(p, com_string);
- if (retval == COM_LOGOUT && com_string != NULL) {
+ if (retval == COM_LOGOUT) { // && com_string != NULL
fprintf(stderr, "%s tried to log in and failed.\n",
com_string);
}