summaryrefslogtreecommitdiff
path: root/builtin-mv.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-mv.c')
-rw-r--r--builtin-mv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-mv.c b/builtin-mv.c
index b2ecc26..e3bc7a8 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -26,7 +26,7 @@ static const char **copy_pathspec(const char *prefix, const char **pathspec,
if (length > 0 && result[i][length - 1] == '/') {
char *without_slash = xmalloc(length);
memcpy(without_slash, result[i], length - 1);
- without_slash[length] = '\0';
+ without_slash[length - 1] = '\0';
result[i] = without_slash;
}
if (base_name) {