aboutsummaryrefslogtreecommitdiff
path: root/builtin-mv.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-08-21 22:22:25 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-21 14:15:45 -0700
commit6e17886d376ee8480cc9a8b9bc5046f2d721565f (patch)
treeddfc5e55fb9af83d4b81e2aa3e4f388361b9d57f /builtin-mv.c
parentc5203bdf66531c848a2b6cd74f3c02cb18286c55 (diff)
downloadgit-6e17886d376ee8480cc9a8b9bc5046f2d721565f.tar.gz
git-6e17886d376ee8480cc9a8b9bc5046f2d721565f.tar.xz
git-mv: fix off-by-one error
Embarassing. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 b2ecc26f2..e3bc7a86b 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) {