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

fix(style): prevent overflow in the style count (#3727)

This commit is contained in:
martaaay 2022-10-07 13:12:32 -04:00 committed by GitHub
parent 53465aec94
commit e40a82a1b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,8 @@ void _lv_obj_style_init(void)
void lv_obj_add_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector)
{
LV_ASSERT(obj->style_cnt < 63);
trans_del(obj, selector, LV_STYLE_PROP_ANY, NULL);
uint32_t i;