From 8acd785888b9324994f0477d6d2f2bdcd3b91219 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 27 Feb 2016 03:20:34 +0100
Subject: krnl386.exe16: Do not reassign default handles after they got closed.

---
 dlls/krnl386.exe16/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/krnl386.exe16/file.c b/dlls/krnl386.exe16/file.c
index b66b753..9b720ef 100644
--- a/dlls/krnl386.exe16/file.c
+++ b/dlls/krnl386.exe16/file.c
@@ -363,7 +363,7 @@ HFILE16 WINAPI _lclose16( HFILE16 hFile )
     }
     TRACE("%d (handle32=%p)\n", hFile, dos_handles[hFile] );
     CloseHandle( dos_handles[hFile] );
-    dos_handles[hFile] = 0;
+    dos_handles[hFile] = (hFile < 5) ? INVALID_HANDLE_VALUE : 0;
     return 0;
 }
 
-- 
2.7.1

