mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(draw_sw_img): avoid divide by zero (#7447)
This commit is contained in:
parent
cd9c7e5b6b
commit
e1f2b2e451
@ -388,6 +388,9 @@ static void recolor_only(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
|
||||
uint8_t * tmp_buf;
|
||||
int32_t buf_h;
|
||||
uint32_t buf_stride = blend_w * px_size;
|
||||
if(buf_stride == 0) {
|
||||
buf_stride = 1;
|
||||
}
|
||||
buf_h = MAX_BUF_SIZE / buf_stride;
|
||||
if(buf_h > blend_h) buf_h = blend_h;
|
||||
tmp_buf = lv_malloc(buf_stride * buf_h);
|
||||
|
Loading…
x
Reference in New Issue
Block a user