Author: tsoome
Date: Tue Dec  3 18:36:39 2019
New Revision: 355347
URL: https://svnweb.freebsd.org/changeset/base/355347

Log:
  loader: ReadKeyStrokeEx may return partial keystrokes
  
  In some systems we can receive no scancode nor unicodechar values.
  
  PR:           240760
  Reported by:  Ariel Millennium Thornton
  MFC after:    1 week

Modified:
  head/stand/efi/libefi/efi_console.c

Modified: head/stand/efi/libefi/efi_console.c
==============================================================================
--- head/stand/efi/libefi/efi_console.c Tue Dec  3 18:28:39 2019        
(r355346)
+++ head/stand/efi/libefi/efi_console.c Tue Dec  3 18:36:39 2019        
(r355347)
@@ -1126,10 +1126,11 @@ efi_readkey_ex(void)
                                        kp->UnicodeChar++;
                                }
                        }
+                       if (kp->ScanCode == 0 && kp->UnicodeChar == 0)
+                               return (false);
+                       keybuf_inschar(kp);
+                       return (true);
                }
-
-               keybuf_inschar(kp);
-               return (true);
        }
        return (false);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to