From a352c51739ce387432176e646bc37429188ecd38 Mon Sep 17 00:00:00 2001 From: zaCade Date: Sat, 21 Jul 2018 17:48:52 +0200 Subject: [PATCH] NameFilter: Break guard loop on name length zero. Seems on CSGO, it sometimes keeps looping despite the name already being non-existant. --- NameFilter/scripting/NameFilter.sp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NameFilter/scripting/NameFilter.sp b/NameFilter/scripting/NameFilter.sp index edd7af57..23c42635 100644 --- a/NameFilter/scripting/NameFilter.sp +++ b/NameFilter/scripting/NameFilter.sp @@ -253,6 +253,9 @@ bool FilterName(int client, char[] sName, int Length = MAX_NAME_LENGTH) int Guard; for(Guard = 0; Guard < 100; Guard++) { + if (!strlen(sName)) + break; + int Match = MatchRegex(g_FilterExpr, sName, iError); if(iError != REGEX_ERROR_NONE) {