lv_draw_img: fix buffer oveflow with alpha byte

This commit is contained in:
Gabor Kiss-Vamosi
2018-06-01 12:38:23 +02:00
parent 61645fe5a9
commit 47cafb52b5
2 changed files with 4 additions and 4 deletions

View File

@@ -452,9 +452,9 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
lv_color_t buf[lv_area_get_width(&mask_com)];
#else
# if LV_HOR_RES > LV_VER_RES
lv_color_t buf[LV_HOR_RES];
uint8_t buf[LV_HOR_RES * px_size];
# else
lv_color_t buf[LV_VER_RES];
uint8_t buf[LV_VER_RES * px_size];
# endif
#endif
for(row = mask_com.y1; row <= mask_com.y2; row ++) {

4
lvgl.h
View File

@@ -56,8 +56,8 @@ extern "C" {
/*Current version of LittlevGL*/
#define LVGL_VERSION_MAJOR 5
#define LVGL_VERSION_MINOR 1
#define LVGL_VERSION_PATCH 1
#define LVGL_VERSION_INFO ""
#define LVGL_VERSION_PATCH 2
#define LVGL_VERSION_INFO "beta"
/**********************
* TYPEDEFS