Skip to content
Snippets Groups Projects
Commit cd04c90a authored by Logan Aerl Arias's avatar Logan Aerl Arias
Browse files

Merge branch 'fix_softlock' into 'next'

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

See merge request STJr/SRB2!2323
parents 9fb7b902 532abf92
Branches
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment