Commit 043f92db authored by twanvl's avatar twanvl

Fix error in vc9: use _wassert instead of _assert, the latter no longer exists.

parent 97492e8d
...@@ -19,18 +19,18 @@ DECLARE_TYPEOF_COLLECTION(ScriptParseError); ...@@ -19,18 +19,18 @@ DECLARE_TYPEOF_COLLECTION(ScriptParseError);
// ----------------------------------------------------------------------------- : Debug utilities // ----------------------------------------------------------------------------- : Debug utilities
#if defined(_MSC_VER) && defined(_DEBUG) #if defined(_MSC_VER) && defined(_DEBUG)
void msvc_assert(const char* msg, const char* expr, const char* file, unsigned line) { void msvc_assert(const wchar_t* msg, const wchar_t* expr, const wchar_t* file, unsigned line) {
if (IsDebuggerPresent()) { if (IsDebuggerPresent()) {
char buffer[1024]; wchar_t buffer[1024];
if (msg) { if (msg) {
sprintf(buffer, "Assertion failed: %s: %s, file %s, line %d\n", msg, expr, file, line); wsprintf(buffer, L"Assertion failed: %s: %s, file %s, line %d\n", msg, expr, file, line);
} else { } else {
sprintf(buffer, "Assertion failed: %s, file %s, line %d\n", expr, file, line); wsprintf(buffer, L"Assertion failed: %s, file %s, line %d\n", expr, file, line);
} }
OutputDebugStringA(buffer); OutputDebugStringW(buffer);
DebugBreak(); DebugBreak();
} else { } else {
_assert(expr, file, line); _wassert(expr, file, line);
} }
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment