From 00e00d76804b7bd07c72589492cb0b4052fb2bf5 Mon Sep 17 00:00:00 2001 From: zaCade Date: Tue, 24 Jan 2023 13:43:53 +0100 Subject: [PATCH] [ExploitListener] Fix array out of bounds. --- ExploitListener/scripting/exploit_listener.sp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/ExploitListener/scripting/exploit_listener.sp b/ExploitListener/scripting/exploit_listener.sp index 9fb552f4..4e547f94 100644 --- a/ExploitListener/scripting/exploit_listener.sp +++ b/ExploitListener/scripting/exploit_listener.sp @@ -1,6 +1,5 @@ #include - #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); } - -