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

fix(chart): lv_malloc() was allocating double size needed (#7200)

This commit is contained in:
Victor Wheeler 2024-11-04 01:51:46 -07:00 committed by GitHub
parent 26e4225d74
commit 6b7d0a3819
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,7 +94,7 @@ void lv_chart_set_type(lv_obj_t * obj, lv_chart_type_t type)
if(type == LV_CHART_TYPE_SCATTER) {
lv_chart_series_t * ser;
LV_LL_READ_BACK(&chart->series_ll, ser) {
ser->x_points = lv_malloc(sizeof(lv_point_t) * chart->point_cnt);
ser->x_points = lv_malloc(sizeof(int32_t) * chart->point_cnt);
LV_ASSERT_MALLOC(ser->x_points);
if(ser->x_points == NULL) return;
}