Skip to content

Commit

Permalink
Add check if client index is valid to ChatListener callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Impact123 committed Feb 11, 2017
1 parent 1aabdb6 commit 3abe775
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gameserver/calladmin.sp
Expand Up @@ -1344,6 +1344,15 @@ public int MenuHandler_BanReason(Menu menu, MenuAction action, int client, int p

public Action ChatListener(int client, const char[] command, int argc)
{
// There were a few cases were the client index was invalid which caused an index out-of-bounds error
// Invalid clients shouldn't be able to trigger this callback so the reason why this happens has yet to be found out
// Until then we have this check here to prevent it
if (!IsClientValid(client))
{
return Plugin_Continue;
}


if (g_bAwaitingReason[client] && !IsChatTrigger())
{
// 2 more for quotes
Expand Down

0 comments on commit 3abe775

Please sign in to comment.