VM_tokenizebyseparator, these were not multiplying by 3 as is required
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7254
d7cf8633-e32d-0410-b094-
e92efae38249
VM_SAFEPARMCOUNTRANGE(1, 8, VM_M_callfunction);
- s = PRVM_G_STRING(OFS_PARM0 + (prog->argc - 1));
+ s = PRVM_G_STRING(OFS_PARM0+(prog->argc - 1)*3);
VM_CheckEmptyString(s);
for (j = 1;j < prog->argc;j++)
{
// skip any blank separator strings
- if (!PRVM_G_STRING(OFS_PARM0 + j)[0])
+ const char *s = PRVM_G_STRING(OFS_PARM0+j*3);
+ if (!s[0])
continue;
- separators[numseparators] = PRVM_G_STRING(OFS_PARM0 + j);
- separatorlen[numseparators] = strlen(separators[numseparators]);
+ separators[numseparators] = s;
+ separatorlen[numseparators] = strlen(s);
numseparators++;
}