Update win_console.c

This commit is contained in:
Jan Bodnar 2016-04-06 14:09:52 +02:00
parent a769bcc6fc
commit 29e33df3ee

View File

@ -11,7 +11,12 @@ int wmain(int argc, wchar_t **argv) {
GetLastError());
}
WriteConsoleW(std, argv[1], wcslen(argv[1]), cChars, NULL);
if (argv[1]) {
WriteConsoleW(std, argv[1], wcslen(argv[1]), cChars, NULL);
}
CloseHandle(std);
return EXIT_SUCCESS;
return 0;
}