mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Scenario of (invalid) or (connection) names breaking /swap
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
parent
35991ea973
commit
6ecd326b4c
|
@ -705,7 +705,7 @@ void CGameContext::ConSwap(IConsole::IResult *pResult, void *pUserData)
|
|||
int TargetClientId = -1;
|
||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||
{
|
||||
if(!str_comp(pName, pSelf->Server()->ClientName(i)))
|
||||
if(pSelf->m_apPlayers[i] && !str_comp(pName, pSelf->Server()->ClientName(i)))
|
||||
{
|
||||
TargetClientId = i;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue