Make sure to initialize INPUT_RECORD variables because of the union data type section

pull/1726/head
Jens Steube 6 years ago
parent fd960aef53
commit 4359f61f84

@ -754,9 +754,11 @@ int select_read_timeout_console (const int sec)
INPUT_RECORD inRecords;
inRecords.EventType = 0;
PeekConsoleInput (hStdIn, &inRecords, 1, &dwRead);
if (inRecords.EventType == KEY_EVENT)
if (inRecords.EventType == 0)
{
// those are good ones

Loading…
Cancel
Save