Merge branch 'connect-empty-address-fix' into 'master'
Fixed "invalid pointer" error when passing "" to Command_connect(). See merge request STJr/SRB2!234
This commit is contained in:
commit
452aef4981
2 files changed
+8
-1
No files matched your search
+1
-1
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user