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];
int numseparators;
int separatorlen[7];
const char *separators[7];
const char *token;
char tokentext[MAX_INPUTLINE];
const char *token;
char tokentext[MAX_INPUTLINE];
{
token = tokentext + j;
tokens_startpos[num_tokens] = p - tokenize_string;
{
token = tokentext + j;
tokens_startpos[num_tokens] = p - tokenize_string;
while (*p)
{
for (k = 0;k < numseparators;k++)
while (*p)
{
for (k = 0;k < numseparators;k++)
if (j < (int)sizeof(tokentext)-1)
tokentext[j++] = *p;
p++;
if (j < (int)sizeof(tokentext)-1)
tokentext[j++] = *p;
p++;
- tokens_endpos[num_tokens] = p - tokenize_string;
+ tokens_endpos[num_tokens] = p0 - tokenize_string;
if (j >= (int)sizeof(tokentext))
break;
tokentext[j++] = 0;
if (j >= (int)sizeof(tokentext))
break;
tokentext[j++] = 0;