diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/assert.h | 9 |
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 + |