Merge branch 'fix_softlock' into 'next'

dc_texheight must be (INT64) to prevent overflow and rendering softlock

See merge request STJr/SRB2!2323
This commit is contained in:
Logan Aerl Arias 2024-02-18 01:21:04 +00:00
commit cd04c90a8a

View file

@ -441,7 +441,7 @@ static void R_DrawRepeatMaskedColumn(column_t *col, unsigned lengthcol)
{
while (sprtopscreen < sprbotscreen) {
R_DrawMaskedColumn(col, lengthcol);
if ((INT64)sprtopscreen + dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow
if ((INT64)sprtopscreen + (INT64)dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow
sprtopscreen = INT32_MAX;
else
sprtopscreen += dc_texheight*spryscale;