From 222807c6f62d73e60c33f1d229f8c7678273b562 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 15 May 2017 14:29:31 +0100 Subject: [PATCH] Fix R_InitExtraColormaps reporting 6 or more colormaps every time you loaded the game, even though we haven't used C_START/C_END in more than a decade now Note to self: W_ functions are awfully confusing with returning with LUMPERROR or INT16_MAX. Should sort out what's going on there if necessary --- src/r_data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_data.c b/src/r_data.c index 7bad6bb8..4066ca64 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -944,12 +944,12 @@ static void R_InitExtraColormaps(void) for (cfile = clump = 0; cfile < numwadfiles; cfile++, clump = 0) { startnum = W_CheckNumForNamePwad("C_START", cfile, clump); - if (startnum == LUMPERROR) + if (startnum == INT16_MAX) continue; endnum = W_CheckNumForNamePwad("C_END", cfile, clump); - if (endnum == LUMPERROR) + if (endnum == INT16_MAX) I_Error("R_InitExtraColormaps: C_START without C_END\n"); if (WADFILENUM(startnum) != WADFILENUM(endnum))