diff --git a/ChangeLog b/ChangeLog index 202555d4c..961b6d977 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-02-28 OKUJI Yoshinori + + From Thierry Laronde : + * stage2/stage2.c (cmain): If the default entry is wrong, set it + to FALLBACK_ENTRY if FALLBACK_ENTRY is valid, otherwise set it + to zero. Suggested by Nicolas Boos . + 2001-02-28 OKUJI Yoshinori * acconfig.h (AUTO_LINUX_MEM_OPT): New entry. diff --git a/stage2/stage2.c b/stage2/stage2.c index 77af602f0..b8756ce5d 100644 --- a/stage2/stage2.c +++ b/stage2/stage2.c @@ -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 ();