summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 4551b4a3b5..6b19fc8454 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -5152,7 +5152,7 @@ _mesa_clip_to_region(GLint xmin, GLint ymin,
/* right clipping */
if (*x + *width > xmax)
- *width -= (*x + *width - xmax - 1);
+ *width -= (*x + *width - xmax);
if (*width <= 0)
return GL_FALSE;
@@ -5165,7 +5165,7 @@ _mesa_clip_to_region(GLint xmin, GLint ymin,
/* top (or bottom) clipping */
if (*y + *height > ymax)
- *height -= (*y + *height - ymax - 1);
+ *height -= (*y + *height - ymax);
if (*height <= 0)
return GL_FALSE;