# HG changeset patch # User rubidium # Date 2007-09-24 19:15:42 # Node ID 05fa62ddb883732beda8f088237475638c0fa2a2 # Parent daa0c0f8796076728f8e531a86d607d3af6b19a9 (svn r11155) -Fix [FS#1253]: work around a nasty MS CRT 8 SP1 bug making it virtually impossible to debug 32bpp games under MSVC (http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=257606). Patch by boekabart. diff --git a/src/fileio.cpp b/src/fileio.cpp --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -296,6 +296,10 @@ FILE *FioFOpenFileSp(const char *filenam snprintf(buf, lengthof(buf), "%s%s%s", _searchpaths[sp], _subdirs[subdir], filename); } +#if defined(WIN32) + if (GetFileAttributes(OTTD2FS(buf)) == -1) return NULL; +#endif + f = fopen(buf, mode); #if !defined(WIN32) if (f == NULL) {