[WARNING] strtok limit!!
#4

Quote:
Originally Posted by Y_Leѕѕ
Firsly - strtok has ALWAYS had a limit, and if you don't like it then it's in an open source library, so just change it.

Secondly - use sscanf!
Strtok has ALWAYS had a limit? YES THIS WAS MINE:
-------------------------------------
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[128];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
--------------------------------------
And I'd never changed. But this is other....


I think that all joung nub scripter can't change the libraries. And than:
For me, to have a default lower limit to the maximum limit of characters of a PlayerName is ridiculous.

Reply


Messages In This Thread
[WARNING] strtok limit!! - by SoeH - 19.10.2009, 10:02
Re: [WARNING] strtok limit!! - by uncle_nutsy - 19.10.2009, 10:10
Re: [WARNING] strtok limit!! - by SoeH - 19.10.2009, 10:13
Re: [WARNING] strtok limit!! - by SoeH - 19.10.2009, 10:42
Re: [WARNING] strtok limit!! - by Sergei - 19.10.2009, 11:03
Re: [WARNING] strtok limit!! - by SoeH - 19.10.2009, 11:10
Re: [WARNING] strtok limit!! - by Sergei - 19.10.2009, 11:14
Re: [WARNING] strtok limit!! - by SoeH - 19.10.2009, 11:26
Re: [WARNING] strtok limit!! - by dice7 - 19.10.2009, 12:20
Re: [WARNING] strtok limit!! - by SoeH - 19.10.2009, 12:28

Forum Jump:


Users browsing this thread: 1 Guest(s)