msvcrt: Don't set invalid std handles with kernel32.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
18883a7676
commit
b5408ff58c
|
@ -417,6 +417,7 @@ static void msvcrt_set_fd(ioinfo *fdinfo, HANDLE hand, int flag)
|
||||||
fdinfo->lookahead[2] = '\n';
|
fdinfo->lookahead[2] = '\n';
|
||||||
fdinfo->exflag &= EF_CRIT_INIT;
|
fdinfo->exflag &= EF_CRIT_INIT;
|
||||||
|
|
||||||
|
if (hand == MSVCRT_NO_CONSOLE) hand = 0;
|
||||||
switch (fdinfo-MSVCRT___pioinfo[0])
|
switch (fdinfo-MSVCRT___pioinfo[0])
|
||||||
{
|
{
|
||||||
case 0: SetStdHandle(STD_INPUT_HANDLE, hand); break;
|
case 0: SetStdHandle(STD_INPUT_HANDLE, hand); break;
|
||||||
|
|
Loading…
Reference in New Issue