mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Fix error in vc9: use _wassert instead of _assert, the latter no longer exists.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1508 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+6
-6
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user