diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index ed73de2ec..824fd08e7 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -98,10 +98,7 @@ static void HWR_DrawColumnInCache(const column_t *patchcol, UINT8 *block, GLMipm position = 0; } - position = ((position * scale_y) + (FRACUNIT/2)) >> FRACBITS; - - if (position < 0) - position = 0; + position = max(((position * scale_y) + (FRACUNIT/2)) >> FRACBITS, 0); if (position + count >= pblockheight) count = pblockheight - position;