From fe01c01580e8688d2a1be73dc53f9af93d10d415 Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Mon, 18 May 2009 00:05:27 +0100 Subject: [PATCH] * Implementation of assert() in bg_lib.h (bug #3707) --- code/game/bg_lib.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git ioq3-r1553/code/game/bg_lib.h assert/code/game/bg_lib.h index 54a379b..fd73015 100644 --- ioq3-r1553/code/game/bg_lib.h +++ assert/code/game/bg_lib.h @@ -77,6 +77,10 @@ typedef char * va_list; #define isxupper(c) (isdigit(c) || (c >= 'A' && c <= 'F')) // Misc functions +#define assert( expr )\ + if( !( expr ) )\ + Com_Error( ERR_DROP, "%s:%d: Assertion `%s' failed",\ + __FILE__, __LINE__, #expr ) typedef int cmp_t(const void *, const void *); void qsort(void *a, size_t n, size_t es, cmp_t *cmp); void srand( unsigned seed ); -- 1.6.3