summaryrefslogtreecommitdiffstats
path: root/src/filepath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/filepath.c')
-rw-r--r--src/filepath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/filepath.c b/src/filepath.c
index c30d9bf82b..1ea0623867 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -2159,7 +2159,7 @@ f_resolve(typval_T *argvars, typval_T *rettv)
if (q > p && *q == NUL)
{
// Ignore trailing path separator.
- q[-1] = NUL;
+ p[q - p - 1] = NUL;
q = gettail(p);
}
if (q > p && !mch_isFullName(buf))