diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c index e7a83c2d6..d5e0c79a7 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -698,7 +698,8 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot) c = grub_getkey_noblock (); - if (c != GRUB_TERM_NO_KEY) + /* Negative values are returned on error. */ + if ((c != GRUB_TERM_NO_KEY) && (c > 0)) { if (timeout >= 0) {