Merge branch 'td-render-fix2' into 'master'

TD render fix 2: Electric boogaloo

This fixes TD's terminal stage freezing the game in a similar manner to Lava Mountain, except this time the FOFs aren't zero-height so it's a slightly different situation?

See merge request !160
This commit is contained in:
Monster Iestyn 2017-02-03 12:27:03 -05:00
commit 823aa7d24d

View file

@ -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;
} }
} }