From 5919f7641ef28e7e58b89da6cee142f0418cdbc5 Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 27 Sep 2012 10:25:09 +0000 Subject: [PATCH] fix rcon crash git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11853 d7cf8633-e32d-0410-b094-e92efae38249 --- host_cmd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/host_cmd.c b/host_cmd.c index 4d2b93b6..841c4df2 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -2463,6 +2463,12 @@ static void Host_PQRcon_f (void) lhnetsocket_t *mysocket; char peer_address[64]; + if (Cmd_Argc() == 1) + { + Con_Printf("%s: Usage: %s command\n", Cmd_Argv(0), Cmd_Argv(0)); + return; + } + if (!rcon_password.string || !rcon_password.string[0] || rcon_secure.integer > 0) { Con_Printf ("You must set rcon_password before issuing an pqrcon command, and rcon_secure must be 0.\n"); @@ -2524,6 +2530,12 @@ static void Host_Rcon_f (void) // credit: taken from QuakeWorld lhnetsocket_t *mysocket; char vabuf[1024]; + if (Cmd_Argc() == 1) + { + Con_Printf("%s: Usage: %s command\n", Cmd_Argv(0), Cmd_Argv(0)); + return; + } + if (!rcon_password.string || !rcon_password.string[0]) { Con_Printf ("You must set rcon_password before issuing an rcon command.\n"); -- 2.39.2