Fix the midtexture bug (combination of underzealous and overzealous safety checking cancelling each other out in a way which was broken but not crashy)

This commit is contained in:
toaster 2021-06-04 17:04:35 +01:00
parent 0606f61543
commit cac0e71c18

View file

@ -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];
}