diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2023-06-12 16:37:19 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2023-06-12 16:39:32 +0200 |
commit | bab8828b0dad1d51d6b34e38249f0641ca64b1e9 (patch) | |
tree | e8726c89265aaad6f80581ad9059a0e74ea2de78 /shell/hush.c | |
parent | 8f0e4c42c630126daafd834175b86d2b28f5b798 (diff) | |
download | busybox-w32-bab8828b0dad1d51d6b34e38249f0641ca64b1e9.tar.gz busybox-w32-bab8828b0dad1d51d6b34e38249f0641ca64b1e9.tar.bz2 busybox-w32-bab8828b0dad1d51d6b34e38249f0641ca64b1e9.zip |
hush: fix expansion of space in "a=${a:+$a }c" construct
function old new delta
encode_then_append_var_plusminus 554 552 -2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c index cdaa67a3b..dbc4aecab 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -6398,7 +6398,7 @@ static NOINLINE int encode_then_append_var_plusminus(o_string *output, int n, | |||
6398 | if (!dest.o_expflags) { | 6398 | if (!dest.o_expflags) { |
6399 | if (ch == EOF) | 6399 | if (ch == EOF) |
6400 | break; | 6400 | break; |
6401 | if (!dquoted && strchr(G.ifs, ch)) { | 6401 | if (!dquoted && !(output->o_expflags & EXP_FLAG_SINGLEWORD) && strchr(G.ifs, ch)) { |
6402 | /* PREFIX${x:d${e}f ...} and we met space: expand "d${e}f" and start new word. | 6402 | /* PREFIX${x:d${e}f ...} and we met space: expand "d${e}f" and start new word. |
6403 | * do not assume we are at the start of the word (PREFIX above). | 6403 | * do not assume we are at the start of the word (PREFIX above). |
6404 | */ | 6404 | */ |