summaryrefslogtreecommitdiff
path: root/subst.c
diff options
context:
space:
mode:
Diffstat (limited to 'subst.c')
-rw-r--r--subst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/subst.c b/subst.c
index d9feabca..93b91606 100644
--- a/subst.c
+++ b/subst.c
@@ -10857,7 +10857,7 @@ expand_array_subscript (string, sindex, quoted, flags)
exp = substring (string, si+1, ni);
t = expand_subscript_string (exp, quoted & ~(Q_ARITH|Q_DOUBLE_QUOTES));
free (exp);
- exp = sh_backslash_quote (t, abstab, 0);
+ exp = t ? sh_backslash_quote (t, abstab, 0) : savestring ("");
free (t);
slen = STRLEN (exp);