From ac9b1074b4a9f48c3dbf79e1763e0177f52946c6 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 22 May 2009 07:51:48 +0000 Subject: [PATCH] Fix limits settings in area export --- caca/codec/export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caca/codec/export.c b/caca/codec/export.c index f789644..2b8317e 100644 --- a/caca/codec/export.c +++ b/caca/codec/export.c @@ -146,7 +146,7 @@ void *caca_export_area_to_memory(caca_canvas_t const *cv, int x, int y, int w, void *ret; if(w < 0 || h < 0 || x < 0 || y < 0 - || x + w >= cv->width || y + h >= cv->height) + || x + w > cv->width || y + h > cv->height) { seterrno(EINVAL); return NULL;