diff options
author | James Bottomley <JBottomley@Parallels.com> | 2013-01-20 12:14:09 +0000 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-01-20 12:14:09 +0000 |
commit | dab7e37194082469c7e740ef8ab3c79ba8d011de (patch) | |
tree | f09f17d93c59383517cf5818ed273b232a1124c7 | |
parent | ca9f820a9f199fd39a84338cdfba95ccbf65749c (diff) | |
download | efitools-dab7e37194082469c7e740ef8ab3c79ba8d011de.tar.gz |
console: fix bug where ESC isn't properly propagated
In a long selector, if you scroll down, ESC isn't reported correctly. Fix By
making sure -1 is returned instead of adding it to the offset.
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | lib/console.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/console.c b/lib/console.c index 1aff1d0..ee323eb 100644 --- a/lib/console.c +++ b/lib/console.c @@ -264,6 +264,9 @@ console_select(CHAR16 *title[], CHAR16* selectors[], int start) uefi_call_wrapper(co->SetCursorPosition, 3, co, SavedConsoleMode.CursorColumn, SavedConsoleMode.CursorRow); uefi_call_wrapper(co->SetAttribute, 2, co, SavedConsoleMode.Attribute); + if (selector < 0) + /* ESC pressed */ + return selector; return selector + selector_offset; } |