mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
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
1 changed files with 4 additions and 1 deletions
|
@ -708,7 +708,10 @@ static void R_DrawRepeatMaskedColumn(column_t *col)
|
||||||
{
|
{
|
||||||
while (sprtopscreen < sprbotscreen) {
|
while (sprtopscreen < sprbotscreen) {
|
||||||
R_DrawMaskedColumn(col);
|
R_DrawMaskedColumn(col);
|
||||||
sprtopscreen += dc_texheight*spryscale;
|
if ((INT64)sprtopscreen + dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow
|
||||||
|
sprtopscreen = INT32_MAX;
|
||||||
|
else
|
||||||
|
sprtopscreen += dc_texheight*spryscale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue