X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/c284f34a498a4b7c85666df867024be63a511d55..9352b0649b8d6aa21d9d567c1d819a0fa26c7b01:/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++;