From 831c4860f58382ba51b964a997220c1eed484465 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 1 Jan 2006 05:48:06 +0000 Subject: [PATCH] revert this for now. We do FAIL_M(s()), where s() returns a CString; doing this causes the return value to go out of scope, and the char* to be invalid. --- stepmania/src/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/global.h b/stepmania/src/global.h index e5837e5fb5..bcdca40859 100644 --- a/stepmania/src/global.h +++ b/stepmania/src/global.h @@ -101,7 +101,7 @@ void NORETURN sm_crash( const char *reason = "Internal error" ); * we get a backtrace. This should probably be used instead of throwing an * exception in most cases we expect never to happen (but not in cases that * we do expect, such as DSound init failure.) */ -#define FAIL_M(MESSAGE) do { const char *pStr = (MESSAGE); CHECKPOINT_M(pStr); sm_crash(pStr); } while(0) +#define FAIL_M(MESSAGE) do { CHECKPOINT_M(MESSAGE); sm_crash(MESSAGE); } while(0) #define ASSERT_M(COND, MESSAGE) do { if(unlikely(!(COND))) { FAIL_M(MESSAGE); } } while(0) #if !defined(CO_EXIST_WITH_MFC) #define ASSERT(COND) ASSERT_M((COND), "Assertion '" #COND "' failed")