mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-21 02:11:19 +00:00
Add missing conditions to CleanupPlayerName
This commit is contained in:
parent
4b1a402731
commit
ab8eed6efb
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…
Reference in a new issue