mirror of
https://github.com/xcat2/xNBA.git
synced 2025-02-12 08:39:36 +00:00
[menu] Fix default selection when default is item 0
Reported-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
4dbb193c33
commit
f5c644cbe1
@ -315,9 +315,9 @@ int show_menu ( struct menu *menu, unsigned int timeout_ms,
|
||||
ui.timeout = ( ( timeout_ms * TICKS_PER_SEC ) / 1000 );
|
||||
list_for_each_entry ( item, &menu->items, list ) {
|
||||
if ( item->label ) {
|
||||
labelled_count++;
|
||||
if ( ! ui.selected )
|
||||
if ( ! labelled_count )
|
||||
ui.selected = ui.count;
|
||||
labelled_count++;
|
||||
if ( item->is_default )
|
||||
ui.selected = ui.count;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user