From b1801ea6224041404f5d72f832a8094f8707576f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 23 Nov 2023 22:16:52 +0100 Subject: [PATCH] fix(image): fix cast to to incorrect type in cover check --- src/widgets/image/lv_image.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/widgets/image/lv_image.c b/src/widgets/image/lv_image.c index 448653dca..b1fa84af5 100644 --- a/src/widgets/image/lv_image.c +++ b/src/widgets/image/lv_image.c @@ -665,9 +665,8 @@ static void draw_image(lv_event_t * e) return; } - const lv_area_t * clip_area = lv_event_get_param(e); if(img->scale_x == LV_SCALE_NONE && img->scale_y == LV_SCALE_NONE) { - if(_lv_area_is_in(clip_area, &obj->coords, 0) == false) { + if(_lv_area_is_in(info->area, &obj->coords, 0) == false) { info->res = LV_COVER_RES_NOT_COVER; return; } @@ -683,7 +682,7 @@ static void draw_image(lv_event_t * e) a.x2 += obj->coords.x1; a.y2 += obj->coords.y1; - if(_lv_area_is_in(clip_area, &a, 0) == false) { + if(_lv_area_is_in(info->area, &a, 0) == false) { info->res = LV_COVER_RES_NOT_COVER; return; }