aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 6b8f1c88c..9403e1f6c 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -6617,7 +6617,7 @@ static NOINLINE int expand_one_var(o_string *output, int n,
6617 exp_word = p; 6617 exp_word = p;
6618 p = strchr(p, SPECIAL_VAR_SYMBOL); 6618 p = strchr(p, SPECIAL_VAR_SYMBOL);
6619 *p = '\0'; 6619 *p = '\0';
6620 vallen = strlen(val); 6620 vallen = val ? strlen(val) : 0;
6621 if (beg < 0) { 6621 if (beg < 0) {
6622 /* negative beg counts from the end */ 6622 /* negative beg counts from the end */
6623 beg = (arith_t)vallen + beg; 6623 beg = (arith_t)vallen + beg;