mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 02:00:11 +00:00
Merge branch 'possibly-fix-dedi-crash' into 'next'
Possible fix for dedicated server crashes (aka the msvcrt.dll!_mbscat crash) See merge request STJr/SRB2!963
This commit is contained in:
commit
8c5149f180
1 changed files with 9 additions and 5 deletions
|
|
@ -3292,7 +3292,6 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
|||
boolean splitscreenplayer;
|
||||
boolean rejoined;
|
||||
player_t *newplayer;
|
||||
char *port;
|
||||
|
||||
if (playernum != serverplayer && !IsPlayerAdmin(playernum))
|
||||
{
|
||||
|
|
@ -3323,10 +3322,15 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
|||
|
||||
if (server && I_GetNodeAddress)
|
||||
{
|
||||
strcpy(playeraddress[newplayernum], I_GetNodeAddress(node));
|
||||
port = strchr(playeraddress[newplayernum], ':');
|
||||
if (port)
|
||||
*port = '\0';
|
||||
const char *address = I_GetNodeAddress(node);
|
||||
char *port = NULL;
|
||||
if (address) // MI: fix msvcrt.dll!_mbscat crash?
|
||||
{
|
||||
strcpy(playeraddress[newplayernum], address);
|
||||
port = strchr(playeraddress[newplayernum], ':');
|
||||
if (port)
|
||||
*port = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue