From 07e914fc562f336588c38b1318d4a49a9a94225f Mon Sep 17 00:00:00 2001
From: Jannik Vogel <email@jannikvogel.de>
Date: Thu, 20 Aug 2015 16:43:52 +0200
Subject: [PATCH] Fix off-by-one in CLEAR region

---
 hw/xbox/nv2a.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/xbox/nv2a.c b/hw/xbox/nv2a.c
index d1847e1ca7..6263c42fd0 100644
--- a/hw/xbox/nv2a.c
+++ b/hw/xbox/nv2a.c
@@ -5308,10 +5308,10 @@ static void pgraph_method(NV2AState *d,
                 NV_PGRAPH_CLEARRECTY_YMAX);
 
         unsigned int scissor_x = xmin;
-        unsigned int scissor_y = pg->surface_shape.clip_height-ymax;
+        unsigned int scissor_y = pg->surface_shape.clip_height - ymax - 1;
 
-        unsigned int scissor_width = xmax-xmin+1;
-        unsigned int scissor_height = ymax-ymin+1;
+        unsigned int scissor_width = xmax - xmin + 1;
+        unsigned int scissor_height = ymax - ymin + 1;
 
         pgraph_apply_anti_aliasing_factor(pg, &scissor_x, &scissor_y);
         pgraph_apply_anti_aliasing_factor(pg, &scissor_width, &scissor_height);