mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-03 23:11:14 +00:00
dc_texheight must be (INT64) to prevent overflow and rendering softlock
This commit is contained in:
parent
2747e30f8c
commit
532abf9279
1 changed files with 1 additions and 1 deletions
|
@ -441,7 +441,7 @@ static void R_DrawRepeatMaskedColumn(column_t *col, unsigned lengthcol)
|
||||||
{
|
{
|
||||||
while (sprtopscreen < sprbotscreen) {
|
while (sprtopscreen < sprbotscreen) {
|
||||||
R_DrawMaskedColumn(col, lengthcol);
|
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;
|
sprtopscreen = INT32_MAX;
|
||||||
else
|
else
|
||||||
sprtopscreen += dc_texheight*spryscale;
|
sprtopscreen += dc_texheight*spryscale;
|
||||||
|
|
Loading…
Reference in a new issue