git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6734
d7cf8633-e32d-0410-b094-
e92efae38249
int COM_ParseTokenConsole(const char **datapointer)
{
int len;
- int c;
const char *data = *datapointer;
len = 0;
com_token[len] = 0;
*datapointer = data+1;
}
+ else if (*data == '\'')
+ {
+ // quoted string
+ for (data++;*data != '\'';data++)
+ {
+ if (!*data || len >= (int)sizeof(com_token) - 1)
+ {
+ com_token[0] = 0;
+ *datapointer = NULL;
+ return false;
+ }
+ com_token[len++] = *data;
+ }
+ com_token[len] = 0;
+ *datapointer = data+1;
+ }
else
{
// regular word