From ebbfcc657bc820c81913d9356950b76c23bbec24 Mon Sep 17 00:00:00 2001 From: BotoX Date: Sun, 19 Mar 2017 00:37:41 +0100 Subject: [PATCH] NameFilter: Unicode trouble... --- NameFilter/scripting/NameFilter.sp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/NameFilter/scripting/NameFilter.sp b/NameFilter/scripting/NameFilter.sp index 02c0a147..6c57e400 100644 --- a/NameFilter/scripting/NameFilter.sp +++ b/NameFilter/scripting/NameFilter.sp @@ -254,7 +254,14 @@ bool FilterName(int client, char[] sName, int Length = MAX_NAME_LENGTH) int Match = MatchRegex(g_FilterExpr, sName, iError); if(iError != REGEX_ERROR_NONE) { - LogError("Regex Error: %d", iError); + if(iError == REGEX_ERROR_BADUTF8) + { + sName[0] = 0; + bChanged = true; + } + else + LogError("Regex Error: %d", iError); + break; }