Skip to content

Commit c68402f

Browse files
committed
changed a check
1 parent b992b0a commit c68402f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/engine/server/server.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,8 @@ int CServer::SendMsg(CMsgPacker *pMsg, int Flags, int ClientID)
496496
if(!pMsg)
497497
return -1;
498498

499-
// drop packet to dummy client
500-
if(0 <= ClientID && ClientID < MAX_CLIENTS && GameServer()->IsClientBot(ClientID))
499+
// drop invalid packet
500+
if(ClientID != -1 && (ClientID < 0 || ClientID >= MAX_CLIENTS || m_aClients[ClientID].m_State == CClient::STATE_EMPTY || m_aClients[ClientID].m_Quitting))
501501
return 0;
502502

503503
mem_zero(&Packet, sizeof(CNetChunk));

0 commit comments

Comments
 (0)