diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2006-08-21 22:22:25 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-21 14:15:45 -0700 |
commit | 6e17886d376ee8480cc9a8b9bc5046f2d721565f (patch) | |
tree | ddfc5e55fb9af83d4b81e2aa3e4f388361b9d57f /builtin-mv.c | |
parent | c5203bdf66531c848a2b6cd74f3c02cb18286c55 (diff) | |
download | git-6e17886d376ee8480cc9a8b9bc5046f2d721565f.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-mv.c b/builtin-mv.c index b2ecc26f23..e3bc7a86bb 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) { |