Update tmain_ex.c

This commit is contained in:
Jan Bodnar 2016-04-06 14:10:17 +02:00
parent 29e33df3ee
commit cebfb2513d

View File

@ -14,7 +14,12 @@ int _tmain(int argc, TCHAR *argv[]) {
GetLastError());
}
WriteConsole(std, argv[1], _tcslen(argv[1]), cChars, NULL);
if (argv[1]) {
WriteConsole(std, argv[1], _tcslen(argv[1]), cChars, NULL);
}
CloseHandle(std);
return EXIT_SUCCESS;
return 0;
}