src/stdafx.h
changeset 8547 41d5e08fff3b
parent 8546 2a09d7d2a341
child 8619 c2434269c3eb
--- a/src/stdafx.h	Sun Dec 09 20:20:52 2007 +0000
+++ b/src/stdafx.h	Sun Dec 09 21:20:21 2007 +0000
@@ -207,6 +207,13 @@
 		#define strcasecmp stricmp
 		#define strncasecmp strnicmp
 	#endif
+
+	void SetExceptionString(const char* s, ...);
+
+	#if defined(NDEBUG) && defined(WITH_ASSERT)
+		#undef assert
+		#define assert(expression) if (!(expression)) { SetExceptionString("Assertion failed at %s:%d: %s", __FILE__, __LINE__, #expression); *(byte*)0 = 0; }
+	#endif
 #endif /* defined(_MSC_VER) */
 
 #if defined(WINCE)