Alexandre Julliard : msvcrt: Don't set invalid std handles with kernel32.
Alexandre Julliard
julliard at winehq.org
Tue Apr 9 16:31:02 CDT 2019
Module: wine
Branch: master
Commit: b5408ff58cd7803a251dd020a01e1ff170788713
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b5408ff58cd7803a251dd020a01e1ff170788713
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Apr 9 14:06:43 2019 +0200
msvcrt: Don't set invalid std handles with kernel32.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcrt/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 851a89c..8f91ca9 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -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;
More information about the wine-cvs
mailing list