mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-25 19:43:22 +00:00
Add missing conditions to CleanupPlayerName
This commit is contained in:
parent
ad00bc7000
commit
a65e8ab500
1 changed files with 11 additions and 0 deletions
|
|
@ -1010,6 +1010,17 @@ static void CleanupPlayerName(INT32 playernum, const char *newname)
|
|||
|
||||
tmpname = p;
|
||||
|
||||
do
|
||||
{
|
||||
/* from EnsurePlayerNameIsGood */
|
||||
if (!isprint(*p) || *p == ';' || (UINT8)*p >= 0x80)
|
||||
break;
|
||||
}
|
||||
while (*++p) ;
|
||||
|
||||
if (*p)/* bad char found */
|
||||
break;
|
||||
|
||||
// Remove trailing spaces.
|
||||
p = &tmpname[strlen(tmpname)-1]; // last character
|
||||
while (*p == ' ' && p >= tmpname)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue