aboutsummaryrefslogtreecommitdiff
path: root/include/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/assert.h')
-rw-r--r--include/assert.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/assert.h b/include/assert.h
index c36679f8f..ceb71667a 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -3,13 +3,18 @@
#include <stdio.h>
+#ifdef __cplusplus
+extern "C"
+#endif
+__declspec(dllimport) void __stdcall DebugBreak(void);
+
static __inline void __assert(int Cond)
{
#ifdef _DEBUG
if (!Cond)
{
printf("assertion occured.\n");
- __asm int 3;
+ DebugBreak();
while (1);
}
#endif
@@ -18,4 +23,4 @@ static __inline void __assert(int Cond)
#define assert(Cond) __assert((int)(Cond))
#endif
- \ No newline at end of file
+