From cac0e71c18bae1539050a63dfd4f7b6f38179e3c Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 4 Jun 2021 17:04:35 +0100 Subject: [PATCH] Fix the midtexture bug (combination of underzealous and overzealous safety checking cancelling each other out in a way which was broken but not crashy) --- src/r_segs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_segs.c b/src/r_segs.c index d742be0a5..10f445022 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -185,7 +185,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) transtable = 0; blendmode = AST_MODULATE; } - if ((dc_transmap = R_GetBlendTable(blendmode, transtable))) + if (transtable != NUMTRANSMAPS && (dc_transmap = R_GetBlendTable(blendmode, transtable))) { colfunc = colfuncs[COLDRAWFUNC_FUZZY]; }