mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Assert on debug builds
This commit is contained in:
parent
a46fd50654
commit
e28563a7f4
1 changed files with 9 additions and 3 deletions
|
@ -302,11 +302,17 @@ void QDECL Com_Error( int code, const char *fmt, ... ) {
|
|||
static int errorCount;
|
||||
int currentTime;
|
||||
|
||||
#ifdef COM_ERROR_ASSERT
|
||||
*( int * )0 = 0;
|
||||
assert( 0 );
|
||||
#ifdef COM_ERROR_DROP_ASSERT
|
||||
if (code == ERR_DROP)
|
||||
{
|
||||
*(int*)0 = 0;
|
||||
assert(qfalse);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Debug builds should stop on this
|
||||
assert(code != ERR_FATAL);
|
||||
|
||||
Cvar_Set( "com_errorCode", va( "%i", code ) );
|
||||
|
||||
// when we are running automated scripts, make sure we
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue