From 4b5098707223d5a73398fb3f1858650eefdb4333 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 5 Nov 2010 14:59:22 +0000 Subject: [PATCH] * evas: fix possible off by one bug with line object. Reported by Daniele. SVN revision: 54182 --- legacy/evas/src/lib/engines/common/evas_line_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/evas/src/lib/engines/common/evas_line_main.c b/legacy/evas/src/lib/engines/common/evas_line_main.c index 92548df9b5..5cae324922 100644 --- a/legacy/evas/src/lib/engines/common/evas_line_main.c +++ b/legacy/evas/src/lib/engines/common/evas_line_main.c @@ -580,7 +580,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x clw = dc->clip.w; clh = dc->clip.h; - data = dst->image.data; + data = evas_cache_image_pixels(&dst->cache_entry); dstw = dst->cache_entry.w; data += (dstw * cly) + clx; @@ -607,7 +607,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (!p1_in) { - if ((py < -1) && (dely < 0)) return; + if ((py <= -1) && (dely < 0)) return; if ((py > by) && (dely > 0)) return; } if ((px) < clw) @@ -642,7 +642,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (!p1_in) { - if ((px < -1) && (delx < 0)) return; + if ((px <= -1) && (delx < 0)) return; if ((px > rx) && (delx > 0)) return; } if ((py) < clh)