mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 00:29:23 +00:00
* grub-core/osdep/windows/emuconsole.c: Remove unsigned comparison >= 0.
But ensure that the variables in question are indeed unsigned.
This commit is contained in:
1 parent
fa7eb63dec
commit
11e4167a35
2 files changed
+8
-5
No files matched your search
@@ -108,11 +108,9 @@ grub_console_getkey (struct grub_term_input *term __attribute__ ((unused)))
|
||||
ret = ir.Event.KeyEvent.uChar.UnicodeChar;
|
||||
if (ret == 0)
|
||||
{
|
||||
if (ir.Event.KeyEvent.wVirtualKeyCode >= 0
|
||||
&& ir.Event.KeyEvent.wVirtualKeyCode
|
||||
< ARRAY_SIZE (windows_codes)
|
||||
&& windows_codes[(int) ir.Event.KeyEvent.wVirtualKeyCode])
|
||||
ret = windows_codes[(int) ir.Event.KeyEvent.wVirtualKeyCode];
|
||||
unsigned kc = ir.Event.KeyEvent.wVirtualKeyCode;
|
||||
if (kc < ARRAY_SIZE (windows_codes) && windows_codes[kc])
|
||||
ret = windows_codes[kc];
|
||||
else
|
||||
continue;
|
||||
if (ir.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED)
|
||||
|
||||
Reference in new issue
Block a user