Fixed broken logic when parsing double quotes.

PR:		bin/61673
MFC after:	1 month
This commit is contained in:
Ruslan Ermilov 2004-01-22 18:17:44 +00:00
parent bee2fe7236
commit cc7282659a

View File

@ -160,24 +160,15 @@ brk_string(char *str, int *store_argc, Boolean expand)
case '"':
case '\'':
if (inquote) {
if (inquote == ch)
if (ch == inquote)
inquote = '\0';
else
break;
} else {
} else
inquote = (char) ch;
/* Don't miss "" or '' */
if (start == NULL && p[1] == inquote) {
start = t + 1;
break;
}
}
if (!expand) {
if (!start)
start = t;
*t++ = ch;
}
continue;
if (expand)
continue;
break;
case ' ':
case '\t':
case '\n':