diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-01-09 08:27:37 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-01-09 08:27:37 +0100 |
commit | 883cdb79a440d0425766f67aaef0cabde0a5060e (patch) | |
tree | c90b5ef771bd4ef39c0ddf27c7a5229bbdde1194 /shell/ash.c | |
parent | cc4303f5e603f3212ede6965ee37609d2a386398 (diff) | |
download | busybox-w32-883cdb79a440d0425766f67aaef0cabde0a5060e.tar.gz busybox-w32-883cdb79a440d0425766f67aaef0cabde0a5060e.tar.bz2 busybox-w32-883cdb79a440d0425766f67aaef0cabde0a5060e.zip |
ash: fix ${unset_var/pattern/repl}
function old new delta
subevalvar 1349 1353 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 37f9dd71b..76bf39ec2 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -7015,7 +7015,8 @@ subevalvar(char *start, char *str, int strloc, | |||
7015 | slash_pos = -1; | 7015 | slash_pos = -1; |
7016 | if (repl) { | 7016 | if (repl) { |
7017 | slash_pos = expdest - ((char *)stackblock() + strloc); | 7017 | slash_pos = expdest - ((char *)stackblock() + strloc); |
7018 | STPUTC('/', expdest); | 7018 | if (!(flag & EXP_DISCARD)) |
7019 | STPUTC('/', expdest); | ||
7019 | //bb_error_msg("repl+1:'%s'", repl + 1); | 7020 | //bb_error_msg("repl+1:'%s'", repl + 1); |
7020 | p = argstr(repl + 1, (flag & EXP_DISCARD) | EXP_TILDE); /* EXP_TILDE: echo "${v/x/~}" expands ~ ! */ | 7021 | p = argstr(repl + 1, (flag & EXP_DISCARD) | EXP_TILDE); /* EXP_TILDE: echo "${v/x/~}" expands ~ ! */ |
7021 | *repl = '/'; | 7022 | *repl = '/'; |