From cf02088179eac4797f220fb697eb603928db30dc Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 3 Aug 2010 16:09:33 +0000 Subject: [PATCH] [CRT] Implement a proper version of _assert. It nows shows a message box with the details and let's the user choose to either abort, debug or ignore the assertion. See bug 5486, bug 5507, bug 5511 svn path=/trunk/; revision=48432 --- reactos/lib/sdk/crt/misc/assert.c | 65 ++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 6 deletions(-) diff --git a/reactos/lib/sdk/crt/misc/assert.c b/reactos/lib/sdk/crt/misc/assert.c index cfef25812c3..38c6940e7e4 100644 --- a/reactos/lib/sdk/crt/misc/assert.c +++ b/reactos/lib/sdk/crt/misc/assert.c @@ -5,15 +5,68 @@ #include #include +static const char formatstr[] = + "Assertion failed!\n\n" + "Program: %s\n" + "File: %s\n" + "Line: %ld\n\n" + "Expression: %s\n" + "Press Retry to debug the application\n"; + /* * @implemented */ -void _assert(const char *msg, const char *file, unsigned line) +void _assert(const char *exp, const char *file, unsigned line) { - /* Assertion failed at foo.c line 45: x