TrueFileName was rewriting input atom in WIN32 :( (obs from Jos Deroo)

This commit is contained in:
U-Xato7\Vsc 2009-11-23 18:42:28 +00:00
parent dd60f64f42
commit 5e70ff47b3
1 changed files with 3 additions and 1 deletions

4
C/sysbits.c Normal file → Executable file
View File

@ -1767,14 +1767,16 @@ TrueFileName (char *source, char *root, char *result, int in_lib)
result[0] = '\0';
#if defined(__MINGW32__) || _MSC_VER
/* step 0: replace / by \ */
strncpy(ares1, source, YAP_FILENAME_MAX);
{
char *p = source, ch = p[0];
char *p = ares1, ch = p[0];
while (ch != '\0') {
if (ch == '/') p[0] = '\\';
p++;
ch = p[0];
}
}
source = ares1;
#endif
/* step 1: eating home information */
if (source[0] == '~') {