mirror of
https://github.com/yquake2/yquake2
synced 2026-08-20 00:26:04 -04:00
GL3: DG_dynarr.h errors shut down game now with Com_Error()
This means that allocations in dynamic arrays will never fail (return NULL) but shut down the game instead. So the github-advanced-security bot can shut up about null dereferences (that were a very theoretical problem anyway, because malloc() is unlikely to return NULL in YQ2).
This commit is contained in:
parent
2873c455ad
commit
d7163fa2dd
1 changed files with 3 additions and 0 deletions
|
|
@ -58,6 +58,9 @@
|
|||
|
||||
#include "HandmadeMath.h"
|
||||
|
||||
#define DG_DYNARR_ASSERT(cond, msg) \
|
||||
((cond) ? (void)0 : Com_Error(ERR_FATAL, "DG_dynarr.h error: %s\n", msg))
|
||||
|
||||
#if 0 // only use this for development ..
|
||||
#define STUB_ONCE(msg) do { \
|
||||
static int show=1; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue