fixed bug in servers setclientname

This commit is contained in:
oy 2010-08-12 16:12:25 +02:00
parent f494d344a9
commit 54f804eda2

View file

@ -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--;