diff --git a/prvm_cmds.c b/prvm_cmds.c index 3eb341544..03eb39a8f 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -2790,8 +2790,8 @@ void VM_tokenizebyseparator (prvm_prog_t *prog) tokens_endpos[num_tokens] = p0 - tokenize_string; if (j >= (int)sizeof(tokentext)) break; - tokentext[j++] = '\0'; - tokens[num_tokens++] = PRVM_SetTempString(prog, token, j - 1); + tokentext[j] = '\0'; + tokens[num_tokens++] = PRVM_SetTempString(prog, token, j++ - (token - tokentext)); if (!*p) break; }