diff --git a/src/r_segs.c b/src/r_segs.c index c531be52..d3fa1c19 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -681,7 +681,7 @@ static void R_DrawRepeatMaskedColumn(column_t *col) { while (sprtopscreen < sprbotscreen) { 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; else sprtopscreen += dc_texheight*spryscale;