Skip to content
Permalink
Browse files
changed a check
  • Loading branch information
oy committed Apr 10, 2020
1 parent b992b0a commit c68402fa7e279d42886d5951d1ea8ac2facc1ea5
Showing 1 changed file with 2 additions and 2 deletions.
@@ -496,8 +496,8 @@ int CServer::SendMsg(CMsgPacker *pMsg, int Flags, int ClientID)
if(!pMsg)
return -1;

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

mem_zero(&Packet, sizeof(CNetChunk));

0 comments on commit c68402f

Please sign in to comment.