mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
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 changed files with 8 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue