From 4056a15ecc0168fa8353830ff8f23be9fb2c749f Mon Sep 17 00:00:00 2001 From: Eugene Yaremenko Date: Thu, 23 Jun 2022 16:14:33 +0200 Subject: [PATCH] fix(gridnav) correct logic in find_last_focusable (#3423) --- src/extra/others/gridnav/lv_gridnav.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extra/others/gridnav/lv_gridnav.c b/src/extra/others/gridnav/lv_gridnav.c index f209ed7fd5..4eec637bd6 100644 --- a/src/extra/others/gridnav/lv_gridnav.c +++ b/src/extra/others/gridnav/lv_gridnav.c @@ -348,7 +348,7 @@ static lv_obj_t * find_last_focusable(lv_obj_t * obj) { uint32_t child_cnt = lv_obj_get_child_cnt(obj); int32_t i; - for(i = child_cnt - 1; i >= 0; i++) { + for(i = child_cnt - 1; i >= 0; i--) { lv_obj_t * child = lv_obj_get_child(obj, i); if(obj_is_focuable(child)) return child; }