diff options
author | glx <glx@openttd.org> | 2007-12-09 21:20:21 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-12-09 21:20:21 +0000 |
commit | 6a83f9141bfc04e66d66fa02fa0f5f74d18fe38a (patch) | |
tree | 9ac65ac4e5c5a30d1b8d89d7aa2e84d745e5abe7 /src/win32.cpp | |
parent | 46c0edc80be8215f49cce21874f8dbd2d86d7ffd (diff) | |
download | openttd-6a83f9141bfc04e66d66fa02fa0f5f74d18fe38a.tar.xz |
(svn r11611) -Codechange: it is now possible to use a define to enable asserts and show them in crash.log for MSVC release builds
Diffstat (limited to 'src/win32.cpp')
-rw-r--r-- | src/win32.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/win32.cpp b/src/win32.cpp index 0e3d4f4ef..b1e143d4f 100644 --- a/src/win32.cpp +++ b/src/win32.cpp @@ -81,6 +81,17 @@ bool LoadLibraryList(Function proc[], const char *dll) #ifdef _MSC_VER static const char *_exception_string = NULL; +void SetExceptionString(const char *s, ...) +{ + va_list va; + char buf[512]; + + va_start(va, s); + vsnprintf(buf, lengthof(buf), s, va); + va_end(va); + + _exception_string = strdup(buf); +} #endif void ShowOSErrorBox(const char *buf) |