Fixed "invalid pointer" error when passing "" to Command_connect().

This commit is contained in:
jameds committed 2018-03-22 21:21:26 -07:00
1 parent 1619b392f6
commit a431197921
2 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -2244,7 +2244,7 @@ static void Command_connect(void)
// Assume we connect directly.
boolean viams = false;
if (COM_Argc() < 2)
if (COM_Argc() < 2 || *COM_Argv(1) == 0)
{
CONS_Printf(M_GetText(
"Connect <serveraddress> (port): connect to a server\n"
+7
View File
@@ -6295,6 +6295,13 @@ static void M_DrawConnectIPMenu(void)
static void M_ConnectIP(INT32 choice)
{
(void)choice;
if (*setupm_ip == 0)
{
M_StartMessage("You must specify an IP address.\n", NULL, MM_NOTHING);
return;
}
COM_BufAddText(va("connect \"%s\"\n", setupm_ip));
// A little "please wait" message.