Fix a couple of bugs in new quoting/comment handling

This commit is contained in:
Kim Woelders 2023-06-27 06:07:07 +02:00
parent 30bdaa84cb
commit e436edb5c9
1 changed files with 5 additions and 2 deletions

View File

@ -150,7 +150,7 @@ Estrtrim2(char *s)
{
int len, len2, ch, quote;
while (isspace(*s) == ' ')
while (isspace(*s))
s++;
quote = '\0';
@ -167,7 +167,10 @@ Estrtrim2(char *s)
goto got_len;
case '\'':
case '"':
quote = (ch == quote) ? '\0' : ch;
if (!quote)
quote = ch;
else if (ch == quote)
quote = '\0';
break;
case '#':
if (quote)