summary refs log tree commit diff
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, 2 insertions, 0 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 06d2c9ea9..64b440027 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -650,6 +650,8 @@ filesubstr(char **namptr, int assign)
 	char *ptr, *tmp, *res, *ptr2;
 	int val;
 
+	if (str[1] == Dash)
+	    str[1] = '-';
 	val = zstrtol(str + 1, &ptr, 10);
 	if (isend(str[1])) {   /* ~ */
 	    *namptr = dyncat(home ? home : "", str + 1);