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>
This commit is contained in:
Johannes Schindelin 2006-08-21 22:22:25 +02:00 committed by Junio C Hamano
parent c5203bdf66
commit 6e17886d37

View File

@ -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) {