Fix sprtopscreen from getting integer overflows once and for all in R_DrawRepeatMaskedColumn
Fixes TD's terminal from freezing the game this time, oh boy
This commit is contained in:
parent
66a45c653a
commit
72bd3e28ed
|
@ -708,6 +708,9 @@ static void R_DrawRepeatMaskedColumn(column_t *col)
|
|||
{
|
||||
while (sprtopscreen < sprbotscreen) {
|
||||
R_DrawMaskedColumn(col);
|
||||
if ((INT64)sprtopscreen + dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow
|
||||
sprtopscreen = INT32_MAX;
|
||||
else
|
||||
sprtopscreen += dc_texheight*spryscale;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue