Skip to content

Commit

Permalink
changed a check
Browse files Browse the repository at this point in the history
  • Loading branch information
oy committed Apr 10, 2020
1 parent b992b0a commit c68402f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engine/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit c68402f

Please sign in to comment.