summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-24 19:15:42 +0000
committerrubidium <rubidium@openttd.org>2007-09-24 19:15:42 +0000
commit3e3122229469be29ebbfd43cb2b1018d900604b0 (patch)
treeabfae0963b9ca99dc1abdeb00aa7a8f3c695a2b8 /src
parent25f244513e5dc7f27797b63110c67a7cb9476c74 (diff)
downloadopenttd-3e3122229469be29ebbfd43cb2b1018d900604b0.tar.xz
(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.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.cpp4
1 files changed, 4 insertions, 0 deletions
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) {