From d4af30b7c7a9060246fe9d77a9747ed5fa99653b Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Sun, 24 Feb 2008 17:35:39 +0100 Subject: [PATCH] Fix sanitary_path_copy() for absolute Windows style paths. We recognized the drive letter and colon, but we did not copy them. So far this was not a problem since the only call site used the same pointer for source and destination. But better safe than sorry. Signed-off-by: Johannes Sixt --- setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.c b/setup.c index b80653c32b..77cc461bd2 100644 --- a/setup.c +++ b/setup.c @@ -16,9 +16,9 @@ static int sanitary_path_copy(char *dst, const char *src) #ifdef __MINGW32__ if (isalpha(*src) && src[1] == ':') { - src += 2; - dst += 2; - dst0 += 2; + *dst++ = *src++; + *dst++ = *src++; + dst0 = dst; } #endif if (is_dir_sep(*src)) {