From 58359f3b7e0ba14305820b39aca6d0b539845adc Mon Sep 17 00:00:00 2001 From: Gabriele 'matrix' Gristina Date: Sun, 24 Jan 2016 17:20:01 +0100 Subject: [PATCH] Fixed 'buf' initialization for windows --- src/shared.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared.c b/src/shared.c index a9828773e..a259c796b 100644 --- a/src/shared.c +++ b/src/shared.c @@ -2446,10 +2446,12 @@ int tty_getchar() // Then it wants to read with getche () a keyboard input // which has never been made. - INPUT_RECORD buf[100] = { 0 }; + INPUT_RECORD buf[100]; DWORD num = 0; + memset (buf, 0, sizeof (buf)); + ReadConsoleInput (stdinHandle, buf, 100, &num); FlushConsoleInputBuffer (stdinHandle);