Fix a problem with passing quoted strings down to commands.
Reviewed by: Sean Eric Fagan
This commit is contained in:
parent
2355afcfc6
commit
7267a81cea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2266
@ -133,14 +133,17 @@ brk_string(str, store_argc)
|
||||
switch(ch = *p) {
|
||||
case '"':
|
||||
case '\'':
|
||||
if (inquote)
|
||||
if (inquote) {
|
||||
if (inquote == ch)
|
||||
inquote = '\0';
|
||||
else
|
||||
break;
|
||||
else
|
||||
} else {
|
||||
inquote = (char) ch;
|
||||
continue;
|
||||
start = t;
|
||||
continue;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case ' ':
|
||||
case '\t':
|
||||
if (inquote)
|
||||
|
Loading…
Reference in New Issue
Block a user