Fix a couple of bugs in new quoting/comment handling
This commit is contained in:
parent
30bdaa84cb
commit
e436edb5c9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue