From afbf08ab1dbfcee5912adbf362352fb8e0e638ad Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Sat, 5 Feb 2005 19:14:56 +0000 Subject: [PATCH] Avoid infinite recursion in debug_warn/assert2 This was SVN commit r1911. --- source/lib/sysdep/win/wdbg.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/lib/sysdep/win/wdbg.cpp b/source/lib/sysdep/win/wdbg.cpp index b34e7f8018..b741950572 100755 --- a/source/lib/sysdep/win/wdbg.cpp +++ b/source/lib/sysdep/win/wdbg.cpp @@ -45,6 +45,13 @@ WIN_REGISTER_FUNC(wdbg_shutdown); #pragma data_seg() +// debug_warn usually uses assert2, but we don't want to call that from +// inside an assert2 (from inside another assert2 (from inside another assert2 +// (... etc))), so just use the normal assert +#undef debug_warn +#define debug_warn(str) assert(0 && (str)) + + static void set_exception_handler();