fix(buttonmatrix): fix 1-off error in lv_buttonmatrix_get_button_text() (#7193)

This commit is contained in:
Victor Wheeler
2024-11-04 01:03:03 -07:00
committed by GitHub
parent a4f66606fa
commit 0380014efb

View File

@@ -319,7 +319,7 @@ const char * lv_buttonmatrix_get_button_text(const lv_obj_t * obj, uint32_t btn_
if(btn_id == LV_BUTTONMATRIX_BUTTON_NONE) return NULL;
lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;
if(btn_id > btnm->btn_cnt) return NULL;
if(btn_id >= btnm->btn_cnt) return NULL;
uint32_t txt_i = 0;
uint32_t btn_i = 0;