diff options
Diffstat (limited to 'src/filepath.c')
-rw-r--r-- | src/filepath.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/filepath.c b/src/filepath.c index 3f7825ceda..654d03aab0 100644 --- a/src/filepath.c +++ b/src/filepath.c @@ -191,7 +191,8 @@ shortpath_for_invalid_fname( } // concat the not-shortened part of the path - vim_strncpy(*fname + len, endp, sfx_len); + if ((*fname + len) != endp) + vim_strncpy(*fname + len, endp, sfx_len); (*fname)[new_len] = NUL; } |