From 576617ec71ee4f74f0342cd8177de52c542fb8d3 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Nov 2018 05:34:57 -0500 Subject: [PATCH] MT_FIREDITEM crash fix --- src/r_draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/r_draw.c b/src/r_draw.c index 560f3063..9026ece3 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -137,11 +137,12 @@ UINT32 nflatxshift, nflatyshift, nflatshiftup, nflatmask; #define ALLWHITE_TT_CACHE_INDEX (MAXSKINS + 3) #define RAINBOW_TT_CACHE_INDEX (MAXSKINS + 4) #define BLINK_TT_CACHE_INDEX (MAXSKINS + 5) +#define TT_CACHE_SIZE (MAXSKINS + 6) #define SKIN_RAMP_LENGTH 16 #define DEFAULT_STARTTRANSCOLOR 160 #define NUM_PALETTE_ENTRIES 256 -static UINT8** translationtablecache[MAXSKINS + 5] = {NULL}; +static UINT8** translationtablecache[TT_CACHE_SIZE] = {NULL}; // See also the enum skincolors_t