diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index 8fedf3450c..666f69821b 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -692,15 +692,9 @@ static int manual_content_scan_system_name_right(unsigned type, const char *labe next_index = current_index + 1; if (next_index >= system_name_list->size) { - if (wraparound) - next_index = 0; - else - { - if (system_name_list->size > 0) - next_index = system_name_list->size - 1; - else - next_index = 0; - } + next_index = 0; + if (!wraparound && system_name_list->size > 0) + next_index = (unsigned)(system_name_list->size - 1); } } @@ -757,15 +751,9 @@ static int manual_content_scan_core_name_right(unsigned type, const char *label, next_index = current_index + 1; if (next_index >= core_name_list->size) { - if (wraparound) - next_index = 0; - else - { - if (core_name_list->size > 0) - next_index = core_name_list->size - 1; - else - next_index = 0; - } + next_index = 0; + if (!wraparound && core_name_list->size > 0) + next_index = (unsigned)(core_name_list->size - 1); } } diff --git a/menu/menu_driver.h b/menu/menu_driver.h index b1f492860d..644746cb3e 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -551,7 +551,7 @@ void menu_driver_get_last_shader_pass_path( const char *menu_driver_get_last_start_directory(void); const char *menu_driver_get_last_start_file_name(void); void menu_driver_set_last_start_content(const char *start_content_path); -const char *menu_driver_get_pending_selection(); +const char *menu_driver_get_pending_selection(void); void menu_driver_set_pending_selection(const char *pending_selection); menu_handle_t *menu_driver_get_ptr(void);