more oops

This commit is contained in:
Vítor Santos Costa
2016-02-29 03:36:10 +00:00
parent e81acc117b
commit 638f784f81
2 changed files with 4 additions and 104 deletions

View File

@@ -495,9 +495,9 @@ const char *DirName(const char *X) {
#endif
static const char *myrealpath(const char *path) {
char *out = LOCAL_FileNameBuf;
#if _WIN32 || defined(__MINGW32__)
DWORD retval = 0;
char *out = LOCAL_FileNameBuf;
// notice that the file does not need to exist
retval = GetFullPathName(path, YAP_FILENAME_MAX, out, NULL);
@@ -543,7 +543,7 @@ static const char *myrealpath(const char *path) {
}
}
#endif
char *out = malloc(strlen(path) + 1);
out = malloc(strlen(path) + 1);
strcpy(out, path);
return out;
}