But ensure that the variables in question are indeed unsigned.
+2013-12-08 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/osdep/windows/emuconsole.c: Remove unsigned comparison >= 0.
+ But ensure that the variables in question are indeed unsigned.
+
2013-12-08 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/emu/lite.c: Add missing include of ../ia64/dl_helper.c.
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)