X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FMacCompatibility.cpp;h=7d049058f71297a7de57fe463bffbedae3ff4465;hb=7de3125ca72d91329f0d4d0980635cf7355c3082;hp=272288a639b09da4b3fd4551d9db6f5e2a8b66be;hpb=1a6d35fbcc13894dda92a395eaea992efbf18e3f;p=lugaru.git diff --git a/Source/MacCompatibility.cpp b/Source/MacCompatibility.cpp index 272288a..7d04905 100644 --- a/Source/MacCompatibility.cpp +++ b/Source/MacCompatibility.cpp @@ -215,10 +215,8 @@ static inline const char *getPrefPath(void) static int locateCorrectCase(char *buf, bool makedirs) { int rc; - char *ptr; - char *prevptr; + char *ptr = buf; - ptr = prevptr = buf; while (ptr = strchr(ptr + 1, '/')) { *ptr = '\0'; /* block this path section off */ rc = locateOneElement(buf);