If the default entry is wrong, use the fallback entry rather than the first, if possible.

This commit is contained in:
okuji committed 2001-02-28 10:14:54 +00:00
1 parent 4b1637c671
commit 348785cfbc
2 files changed
+15 -2

No files matched your search

+8 -2
View File
@@ -966,9 +966,15 @@ cmain (void)
menu_entries = config_entries + config_len;
/* Check if the default entry is present. Otherwise reset
DEFAULT_ENTRY. */
it to fallback if fallback is valid, or to DEFAULT_ENTRY
if not. */
if (default_entry >= num_entries)
default_entry = 0;
{
if (fallback_entry < 0 || fallback_entry >= num_entries)
default_entry = 0;
else
default_entry = fallback_entry;
}
if (is_preset)
close_preset_menu ();