mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fixed bug in servers setclientname
This commit is contained in:
parent
f494d344a9
commit
54f804eda2
|
@ -36,7 +36,7 @@
|
|||
|
||||
static const char *StrLtrim(const char *pStr)
|
||||
{
|
||||
while(*pStr && *pStr <= 32)
|
||||
while(*pStr && *pStr >= 0 && *pStr <= 32)
|
||||
pStr++;
|
||||
return pStr;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ static void StrRtrim(char *pStr)
|
|||
int i = str_length(pStr);
|
||||
while(i >= 0)
|
||||
{
|
||||
if(pStr[i] > 32)
|
||||
if(pStr[i] < 0 || pStr[i] > 32)
|
||||
break;
|
||||
pStr[i] = 0;
|
||||
i--;
|
||||
|
|
Loading…
Reference in a new issue