summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko2018-04-05 17:04:53 +0200
committerDenys Vlasenko2018-04-05 17:04:53 +0200
commitde0262598504f55251e3763e73f259074795de5d (patch)
treed645d8206b8436031934424d55c9941f237f1d64 /shell
parentf2ed39b93075f384f9e82f5130f94174b05dc300 (diff)
downloadbusybox-de0262598504f55251e3763e73f259074795de5d.zip
busybox-de0262598504f55251e3763e73f259074795de5d.tar.gz
hush: update to correctly handle changed var_bash[346].tests
function old new delta expand_one_var 1612 1604 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 42e3118..9ea3e3f 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -5961,11 +5961,11 @@ static NOINLINE const char *expand_one_var(char **to_be_freed_pp, char *arg, cha
/* pattern uses non-standard expansion.
* repl should be unbackslashed and globbed
* by the usual expansion rules:
- * >az; >bz;
- * v='a bz'; echo "${v/a*z/a*z}" prints "a*z"
- * v='a bz'; echo "${v/a*z/\z}" prints "\z"
- * v='a bz'; echo ${v/a*z/a*z} prints "az"
- * v='a bz'; echo ${v/a*z/\z} prints "z"
+ * >az >bz
+ * v='a bz'; echo "${v/a*z/a*z}" #prints "a*z"
+ * v='a bz'; echo "${v/a*z/\z}" #prints "z"
+ * v='a bz'; echo ${v/a*z/a*z} #prints "az"
+ * v='a bz'; echo ${v/a*z/\z} #prints "z"
* (note that a*z _pattern_ is never globbed!)
*/
char *pattern, *repl, *t;
@@ -5977,7 +5977,7 @@ static NOINLINE const char *expand_one_var(char **to_be_freed_pp, char *arg, cha
exp_word = p;
p = strchr(p, SPECIAL_VAR_SYMBOL);
*p = '\0';
- repl = encode_then_expand_string(exp_word, /*process_bkslash:*/ arg0 & 0x80, /*unbackslash:*/ 1);
+ repl = encode_then_expand_string(exp_word, /*process_bkslash:*/ 0, /*unbackslash:*/ 1);
debug_printf_varexp("repl:'%s'->'%s'\n", exp_word, repl);
/* HACK ALERT. We depend here on the fact that
* G.global_argv and results of utoa and get_local_var_value