From 2e4c5d1446f312d830b02d2d2d9163d233ca6d88 Mon Sep 17 00:00:00 2001 From: katsy <katmint@live.com> Date: Mon, 10 Jan 2022 19:32:21 -0600 Subject: [PATCH] alternate fix to #555 which doesn't crash the game --- src/r_patchrotation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_patchrotation.c b/src/r_patchrotation.c index dae3a7b53a..5dbc302866 100644 --- a/src/r_patchrotation.c +++ b/src/r_patchrotation.c @@ -227,10 +227,10 @@ void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle ox = (newwidth / 2) + (leftoffset - xpivot); oy = (newheight / 2) + (patch->topoffset - ypivot); - width = (maxx+1 - minx); - height = (maxy+1 - miny); + width = (maxx - minx); + height = (maxy - miny); - if ((unsigned)(width * height) != size) + if ((unsigned)(width * height) > size) { UINT16 *src, *dest; -- GitLab