Skip to content

Commit

Permalink
win32.c fix: is_readable_console
Browse files Browse the repository at this point in the history
UnicodeChar with lower byte == 0 has dropped accidentaly
this is additional fix for #5634
  • Loading branch information
YO4 authored and nobu committed Sep 8, 2022
1 parent e2ccb31 commit 7a849e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion win32/win32.c
Expand Up @@ -3102,7 +3102,7 @@ is_readable_console(SOCKET sock) /* call this for console only */
RUBY_CRITICAL {
if (PeekConsoleInputW((HANDLE)sock, &ir, 1, &n) && n > 0) {
if (ir.EventType == KEY_EVENT && ir.Event.KeyEvent.bKeyDown &&
ir.Event.KeyEvent.uChar.AsciiChar) {
ir.Event.KeyEvent.uChar.UnicodeChar) {
ret = 1;
}
else {
Expand Down

0 comments on commit 7a849e1

Please sign in to comment.