Merge branch 'softlock' into 'master'

Fix overflow check overflowing in R_DrawRepeatMaskedColumn

See merge request KartKrew/Kart-Public!346
This commit is contained in:
Sal 2024-03-30 01:25:10 +00:00
commit b96a86a289

View file

@ -681,7 +681,7 @@ static void R_DrawRepeatMaskedColumn(column_t *col)
{ {
while (sprtopscreen < sprbotscreen) { while (sprtopscreen < sprbotscreen) {
R_DrawMaskedColumn(col); 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; sprtopscreen = INT32_MAX;
else else
sprtopscreen += dc_texheight*spryscale; sprtopscreen += dc_texheight*spryscale;