Fix unclosed quotes leaving the escape character in

This commit is contained in:
James R 2019-12-30 18:44:13 -08:00
parent 5e5f3c4fa7
commit ab410652ae
1 changed files with 23 additions and 6 deletions

View File

@ -2169,8 +2169,13 @@ skipwhite:
com_token[len] = 0;
return data;
}
com_token[len] = c;
len++;
if (c == '\033')
data += 2;
else
{
com_token[len] = c;
len++;
}
}
}
@ -2186,10 +2191,22 @@ skipwhite:
// parse a regular word
do
{
com_token[len] = c;
data++;
len++;
c = *data;
if (c == '\033')
{
do
{
data += 2;
c = *data;
}
while (c == '\033') ;
}
else
{
com_token[len] = c;
data++;
len++;
c = *data;
}
if (c == '{' || c == '}' || c == ')'|| c == '(' || c == '\'')
break;
} while (c > 32);