From a42fa9e25ce7d0a35016e483b0cf98e3512e98ea Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Sat, 14 Jun 2003 16:45:38 +0000 Subject: fix for bug #749249, related with path of game data placed on root drive under win98 svn-id: r8478 --- common/file.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/file.cpp b/common/file.cpp index 011e167573..037871ad16 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -27,6 +27,12 @@ FILE *File::fopenNoCase(const char *filename, const char *directory, const char char buf[256]; char *ptr; + // Fix for Win98 issue related with game directory pointing to root drive ex. "c:\" + ptr = (char*)directory; + if ((ptr[1] == ':') && (ptr[2] == '\\') && (ptr[3] == 0)) { + ptr[2] = 0; + } + strcpy(buf, directory); if (directory[0] != 0) { #ifdef __MORPHOS__ -- cgit v1.2.3