From 8746d3de4564b50b36501f31bd26db97576ce2e0 Mon Sep 17 00:00:00 2001 From: kisvegabor Date: Fri, 13 Jul 2018 21:47:56 +0200 Subject: [PATCH] fix non const initialization --- lv_draw/lv_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lv_draw/lv_draw.c b/lv_draw/lv_draw.c index a4092ccd0..a7e93fbe9 100644 --- a/lv_draw/lv_draw.c +++ b/lv_draw/lv_draw.c @@ -477,9 +477,9 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, uint8_t buf[lv_area_get_width(&mask_com) * px_size]; #else # if LV_HOR_RES > LV_VER_RES - uint8_t buf[LV_HOR_RES * px_size]; + uint8_t buf[LV_HOR_RES * ((LV_COLOR_DEPTH >> 8) + 1)]; /*+1 because of the possible alpha byte*/ # else - uint8_t buf[LV_VER_RES * px_size]; + uint8_t buf[LV_VER_RES * ((LV_COLOR_DEPTH >> 8) + 1)]; # endif #endif for(row = mask_com.y1; row <= mask_com.y2; row ++) {