Skip to content
Snippets Groups Projects
Commit 2172c9dd authored by Alu Folie's avatar Alu Folie
Browse files

fix overflow check overflowing in R_DrawRepeatMaskedColumn

fixes renderer lock ups with transparent textures in software renderer
parent 62294dfe
No related branches found
No related tags found
2 merge requests!351Raise MOBJFREESLOTS to 2048,!346Fix overflow check overflowing in R_DrawRepeatMaskedColumn
......@@ -681,7 +681,7 @@ static void R_DrawRepeatMaskedColumn(column_t *col)
{
while (sprtopscreen < sprbotscreen) {
R_DrawMaskedColumn(col);
if ((INT64)sprtopscreen + dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow
if (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.
Finish editing this message first!
Please register or to comment