msvcrt: Don't set invalid std handles with kernel32.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-04-09 14:06:43 +02:00
parent 18883a7676
commit b5408ff58c
1 changed files with 1 additions and 0 deletions

View File

@ -417,6 +417,7 @@ static void msvcrt_set_fd(ioinfo *fdinfo, HANDLE hand, int flag)
fdinfo->lookahead[2] = '\n';
fdinfo->exflag &= EF_CRIT_INIT;
if (hand == MSVCRT_NO_CONSOLE) hand = 0;
switch (fdinfo-MSVCRT___pioinfo[0])
{
case 0: SetStdHandle(STD_INPUT_HANDLE, hand); break;