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);
// ----------------------------------------------------------------------------- : Debug utilities
#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()) {
char buffer[1024];
wchar_t buffer[1024];
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 {
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();
} else {
_assert(expr, file, line);
_wassert(expr, file, line);
}
}
#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