git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8777
d7cf8633-e32d-0410-b094-
e92efae38249
int numseparators;
int separatorlen[7];
const char *separators[7];
- const char *p;
+ const char *p, *p0;
const char *token;
char tokentext[MAX_INPUTLINE];
{
token = tokentext + j;
tokens_startpos[num_tokens] = p - tokenize_string;
+ p0 = p;
while (*p)
{
for (k = 0;k < numseparators;k++)
if (j < (int)sizeof(tokentext)-1)
tokentext[j++] = *p;
p++;
+ p0 = p;
}
- tokens_endpos[num_tokens] = p - tokenize_string;
+ tokens_endpos[num_tokens] = p0 - tokenize_string;
if (j >= (int)sizeof(tokentext))
break;
tokentext[j++] = 0;