# HG changeset patch # User rubidium # Date 1190661342 0 # Node ID 2ab4ad82fd44d37a7795841a0f33ac66dcee0c20 # Parent 9505a65c30d51cd0c65eb4d9f740182d044c0d95 (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 -r 9505a65c30d5 -r 2ab4ad82fd44 src/fileio.cpp --- a/src/fileio.cpp Mon Sep 24 19:11:26 2007 +0000 +++ b/src/fileio.cpp Mon Sep 24 19:15:42 2007 +0000 @@ -296,6 +296,10 @@ 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) {