summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-08-21 20:22:25 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-21 21:15:45 (GMT)
commit6e17886d376ee8480cc9a8b9bc5046f2d721565f (patch)
treeddfc5e55fb9af83d4b81e2aa3e4f388361b9d57f
parentc5203bdf66531c848a2b6cd74f3c02cb18286c55 (diff)
downloadgit-6e17886d376ee8480cc9a8b9bc5046f2d721565f.zip
git-6e17886d376ee8480cc9a8b9bc5046f2d721565f.tar.gz
git-6e17886d376ee8480cc9a8b9bc5046f2d721565f.tar.bz2
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>
-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) {