X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/c284f34a498a4b7c85666df867024be63a511d55..5fdf2e706396803f1738f54b7fd65723d39a0fcf:/util.c diff --git a/util.c b/util.c index d0d1c2b1..13ab38e3 100644 --- a/util.c +++ b/util.c @@ -734,7 +734,7 @@ void sanitize_path(char *p, char *reldir) while (1) { /* copy one component through next slash */ *sanp++ = *p++; - if (*p == '\0' || p[1] == '/') { + if (*p == '\0' || p[-1] == '/') { while (*p == '/') { /* skip multiple slashes */ p++;