From 5e70ff47b3323f87ac1459d56550aa7e637c0e06 Mon Sep 17 00:00:00 2001 From: "U-Xato7\\Vsc" Date: Mon, 23 Nov 2009 18:42:28 +0000 Subject: [PATCH] TrueFileName was rewriting input atom in WIN32 :( (obs from Jos Deroo) --- C/sysbits.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 C/sysbits.c diff --git a/C/sysbits.c b/C/sysbits.c old mode 100644 new mode 100755 index 005671bb7..4471f5acd --- a/C/sysbits.c +++ b/C/sysbits.c @@ -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] == '~') {