fix(obj): fix lv_obj_has_flag when ORed values are used

This commit is contained in:
Gabor Kiss-Vamosi
2021-02-24 09:57:36 +01:00
parent 027a82dc35
commit 2ddd485284

View File

@@ -463,7 +463,7 @@ bool lv_obj_has_flag(const lv_obj_t * obj, lv_obj_flag_t f)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
return obj->flags & f ? true : false;
return (obj->flags & f) == f ? true : false;
}
lv_bidi_dir_t lv_obj_get_base_dir(const lv_obj_t * obj)