NameFilter: Unicode trouble...

This commit is contained in:
BotoX 2017-03-19 00:37:41 +01:00
parent 3b40aa0a77
commit ebbfcc657b

View File

@ -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;
}