Browse Source

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>
maint
Johannes Schindelin 19 years ago committed by Junio C Hamano
parent
commit
6e17886d37
  1. 2
      builtin-mv.c

2
builtin-mv.c

@ -26,7 +26,7 @@ static const char **copy_pathspec(const char *prefix, const char **pathspec, @@ -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) {

Loading…
Cancel
Save