Skip to content

Commit

Permalink
Fix invalid server-assigned utf8 names with (1) prefix (fixes #3269)
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed Nov 9, 2020
1 parent f80943d commit b3719d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/engine/server/server.cpp
Expand Up @@ -395,6 +395,7 @@ bool CServer::SetClientNameImpl(int ClientID, const char *pNameRequest, bool Set
for(int i = 1;; i++)
{
str_format(aNameTry, sizeof(aNameTry), "(%d)%s", i, aTrimmedName);
str_utf8_trim_right(aNameTry);
if(IsClientNameAvailable(ClientID, aNameTry))
break;
}
Expand Down

0 comments on commit b3719d7

Please sign in to comment.