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,10 +2169,15 @@ skipwhite:
com_token[len] = 0;
return data;
}
if (c == '\033')
data += 2;
else
{
com_token[len] = c;
len++;
}
}
}
// parse single characters
if (c == '{' || c == '}' || c == ')' || c == '(' || c == '\'')
@ -2185,11 +2190,23 @@ skipwhite:
// parse a regular word
do
{
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);