Fixed 'buf' initialization for windows
authorGabriele 'matrix' Gristina <gm4tr1x@users.noreply.github.com>
Sun, 24 Jan 2016 16:20:01 +0000 (17:20 +0100)
committerGabriele 'matrix' Gristina <gm4tr1x@users.noreply.github.com>
Sun, 24 Jan 2016 16:20:01 +0000 (17:20 +0100)
src/shared.c

index a982877..a259c79 100644 (file)
@@ -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);