mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Alternative fix for cut off names (fixes #4463)
https://github.com/ddnet/ddnet/pull/4465 might have more side effects
This commit is contained in:
parent
b4374b28f1
commit
ea7e39c2f0
|
@ -400,9 +400,9 @@ bool CServer::SetClientNameImpl(int ClientID, const char *pNameRequest, bool Set
|
||||||
// auto rename
|
// auto rename
|
||||||
for(int i = 1;; i++)
|
for(int i = 1;; i++)
|
||||||
{
|
{
|
||||||
char aNameTryBrokenEnd[MAX_NAME_LENGTH];
|
char aNameTryFull[MAX_NAME_LENGTH + 4];
|
||||||
str_format(aNameTryBrokenEnd, sizeof(aNameTryBrokenEnd), "(%d)%s", i, aTrimmedName);
|
str_format(aNameTryFull, sizeof(aNameTryFull), "(%d)%s", i, aTrimmedName);
|
||||||
str_utf8_copy(aNameTry, aNameTryBrokenEnd, sizeof(aNameTry));
|
str_utf8_copy(aNameTry, aNameTryFull, sizeof(aNameTry));
|
||||||
if(IsClientNameAvailable(ClientID, aNameTry))
|
if(IsClientNameAvailable(ClientID, aNameTry))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue