aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-17 16:50:20 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-17 16:50:20 +0200
commit0ba80e4fa251a1c753e5feaff4b358a427aa58cb (patch)
treec52cc7c1f6c51b7c069e8783ade4e7de3b112664
parente32b6503e75d5bcbf8ffff69cafb09523ff2b482 (diff)
downloadbusybox-w32-0ba80e4fa251a1c753e5feaff4b358a427aa58cb.tar.gz
busybox-w32-0ba80e4fa251a1c753e5feaff4b358a427aa58cb.tar.bz2
busybox-w32-0ba80e4fa251a1c753e5feaff4b358a427aa58cb.zip
hush: small fix to last commit
die_if_script() indeed dies only in scripts! Must handle the case where it continues. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/hush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 836f3b83c..c8356f4b8 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -5736,7 +5736,7 @@ static NOINLINE const char *expand_one_var(char **to_be_freed_pp, char *arg, cha
5736 if (len < 0) /* bash compat */ 5736 if (len < 0) /* bash compat */
5737 die_if_script("%s: substring expression < 0", var); 5737 die_if_script("%s: substring expression < 0", var);
5738 } 5738 }
5739 if (len == 0 || !val || beg >= strlen(val)) { 5739 if (len <= 0 || !val || beg >= strlen(val)) {
5740 arith_err: 5740 arith_err:
5741 val = NULL; 5741 val = NULL;
5742 } else { 5742 } else {