[ExploitListener] Fix array out of bounds.

This commit is contained in:
zaCade 2023-01-24 13:43:53 +01:00
parent 6ec7340382
commit 00e00d7680

View File

@ -1,6 +1,5 @@
#include <sourcemod>
#pragma newdecls required
#pragma semicolon 1
@ -10,8 +9,6 @@ bool g_bEvil[MAXPLAYERS + 1];
bool g_bRecording;
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
@ -49,15 +46,15 @@ public Action Command_CommandListener(int client, const char[] command,int argc)
}
else
{
if (!g_bEvil[client])
return Plugin_Continue;
if (!IsValidClient(client))
return Plugin_Continue;
if (!IsClientAuthorized(client))
return Plugin_Continue;
if (!g_bEvil[client])
return Plugin_Continue;
char sBuffer[1024];
GetCmdArgString(sBuffer, sizeof(sBuffer));
@ -131,5 +128,3 @@ stock int IsValidClient(int client, bool nobots = true)
return IsClientInGame(client);
}