mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Merge branch 'repeatmasked-overflow-fix' into 'next'
Prevent infinite loop in R_RenderThickSideRange See merge request STJr/SRB2!2470
This commit is contained in:
commit
021e461813
1 changed files with 2 additions and 2 deletions
|
@ -469,7 +469,7 @@ static void R_DrawRepeatMaskedColumn(column_t *col, unsigned lengthcol)
|
||||||
|
|
||||||
R_DrawMaskedColumn(col, lengthcol);
|
R_DrawMaskedColumn(col, lengthcol);
|
||||||
|
|
||||||
if ((INT64)topscreen + (INT64)texheight > (INT64)INT32_MAX) // prevent overflow
|
if ((INT64)sprtopscreen + (INT64)dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow
|
||||||
break;
|
break;
|
||||||
|
|
||||||
topscreen += texheight;
|
topscreen += texheight;
|
||||||
|
@ -504,7 +504,7 @@ static void R_DrawRepeatFlippedMaskedColumn(column_t *col, unsigned lengthcol)
|
||||||
|
|
||||||
R_DrawFlippedMaskedColumn(col, lengthcol);
|
R_DrawFlippedMaskedColumn(col, lengthcol);
|
||||||
|
|
||||||
if ((INT64)topscreen + (INT64)texheight > (INT64)INT32_MAX) // prevent overflow
|
if ((INT64)sprtopscreen + (INT64)dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow
|
||||||
break;
|
break;
|
||||||
|
|
||||||
topscreen += texheight;
|
topscreen += texheight;
|
||||||
|
|
Loading…
Reference in a new issue