diff --git a/ChangeLog b/ChangeLog index 4bedee201..e74884d84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-12-11 Marco Gerards + + * normal/menu_entry.c (run): Fix off by one bug so the last line + is executed. Move the loader check to outside the loop. + 2006-12-08 Hollis Blanchard * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'. diff --git a/normal/menu_entry.c b/normal/menu_entry.c index 9bc6bba1e..a0597d36e 100644 --- a/normal/menu_entry.c +++ b/normal/menu_entry.c @@ -1007,7 +1007,7 @@ run (struct screen *screen) /* Execute the script, line for line. */ - while (currline < screen->num_lines - 1) + while (currline < screen->num_lines) { editor_getline (&nextline); parsed_script = grub_script_parse (nextline, editor_getline); @@ -1018,15 +1018,15 @@ run (struct screen *screen) /* The parsed script was executed, throw it away. */ grub_script_free (parsed_script); - - if (grub_errno == GRUB_ERR_NONE && grub_loader_is_loaded ()) - /* Implicit execution of boot, only if something is loaded. */ - grub_command_execute ("boot", 0); } else break; } + if (grub_errno == GRUB_ERR_NONE && grub_loader_is_loaded ()) + /* Implicit execution of boot, only if something is loaded. */ + grub_command_execute ("boot", 0); + if (grub_errno != GRUB_ERR_NONE) { grub_print_error ();