1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(lv_draw_sw_line): fix lv_draw_line function causes a crash. (#7248)

Co-authored-by: cmszxl <532538099@qq.com>
This commit is contained in:
anheiqq 2024-11-07 19:39:36 +08:00 committed by GitHub
parent 50e9f48fff
commit 234ce5ef36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,8 +65,8 @@ void lv_draw_sw_line(lv_draw_unit_t * draw_unit, const lv_draw_line_dsc_t * dsc)
if(!is_common) return;
LV_PROFILER_DRAW_BEGIN;
if(dsc->p1.y == dsc->p2.y) draw_line_hor(draw_unit, dsc);
else if(dsc->p1.x == dsc->p2.x) draw_line_ver(draw_unit, dsc);
if((int32_t)dsc->p1.y == (int32_t)dsc->p2.y) draw_line_hor(draw_unit, dsc);
else if((int32_t)dsc->p1.x == (int32_t)dsc->p2.x) draw_line_ver(draw_unit, dsc);
else draw_line_skew(draw_unit, dsc);
if(dsc->round_end || dsc->round_start) {