diff --git a/src/r_patchrotation.c b/src/r_patchrotation.c
index dae3a7b53a6cab88c151e7d1605d99fc5972c321..5dbc30286630c4f51eee55bb7fe2a8d57f4a10e4 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;