summaryrefslogtreecommitdiff
path: root/Src/subst.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/subst.c b/Src/subst.c
index d92be8f89..bbe7b3f07 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -417,7 +417,7 @@ filesubstr(char **namptr, int assign)
val = zstrtol(str + 1, &ptr, 10);
if (isend(str[1])) { /* ~ */
- *namptr = dyncat(home, str + 1);
+ *namptr = dyncat(home ? home : "", str + 1);
return 1;
} else if (str[1] == '+' && isend(str[2])) { /* ~+ */
*namptr = dyncat(pwd, str + 2);