aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/FICS/command.c b/FICS/command.c
index ee9b8d7..1161cfd 100644
--- a/FICS/command.c
+++ b/FICS/command.c
@@ -232,7 +232,8 @@ match_command(char *comm, int p)
i++;
}
- if (in_list(p, L_REMOVEDCOM, command_list[gotIt].comm_name)) {
+ if (gotIt >= 0 &&
+ in_list(p, L_REMOVEDCOM, command_list[gotIt].comm_name)) {
pprintf(p, "Due to a bug - this command has been temporarily "
"removed.\n");
return -COM_FAILED;