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

fix(widget_chart): add assignment to uninitialized variable (#7561)

This commit is contained in:
Paul Vogel 2025-01-08 12:57:47 -06:00 committed by GitHub
parent ce1baa6aa2
commit 7b3320baf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,6 +266,9 @@ void lv_chart_get_point_pos_by_id(lv_obj_t * obj, lv_chart_series_t * ser, uint3
int32_t col_w = (block_w - (ser_gap * (ser_cnt - 1))) / ser_cnt;
p_out->x += col_w / 2;
}
else {
p_out->x = 0;
}
int32_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
p_out->x += lv_obj_get_style_pad_left(obj, LV_PART_MAIN) + border_width;