summaryrefslogtreecommitdiff
path: root/fitz/res_pixmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/res_pixmap.c')
-rw-r--r--fitz/res_pixmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fitz/res_pixmap.c b/fitz/res_pixmap.c
index 0fb3cdad..e9dea86a 100644
--- a/fitz/res_pixmap.c
+++ b/fitz/res_pixmap.c
@@ -384,10 +384,10 @@ void fz_invert_pixmap_rect(fz_pixmap *image, fz_bbox rect)
unsigned char *p;
int x, y, n;
- int x0 = CLAMP(rect.x0 - image->x, 0, image->w - 1);
- int x1 = CLAMP(rect.x1 - image->x, 0, image->w - 1);
- int y0 = CLAMP(rect.y0 - image->y, 0, image->h - 1);
- int y1 = CLAMP(rect.y1 - image->y, 0, image->h - 1);
+ int x0 = fz_clampi(rect.x0 - image->x, 0, image->w - 1);
+ int x1 = fz_clampi(rect.x1 - image->x, 0, image->w - 1);
+ int y0 = fz_clampi(rect.y0 - image->y, 0, image->h - 1);
+ int y1 = fz_clampi(rect.y1 - image->y, 0, image->h - 1);
for (y = y0; y < y1; y++)
{