From 2408a68910ff39d78068abce218c9621bdcc618a Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 24 Sep 2007 19:15:42 +0000 Subject: (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. --- src/fileio.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/fileio.cpp') diff --git a/src/fileio.cpp b/src/fileio.cpp index fae920de2..140c9b2a7 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -296,6 +296,10 @@ FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath sp, Subd 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) { -- cgit v1.2.3-54-g00ecf