Explorar el Código

* fix for bug #38021 based on patch by Sergey Larin

git-svn-id: trunk@47269 -
Tomas Hajny hace 4 años
padre
commit
5c119d5f67
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      rtl/win/sysfile.inc

+ 1 - 1
rtl/win/sysfile.inc

@@ -35,7 +35,7 @@ end;
 
 
 procedure do_close(h : thandle);
 procedure do_close(h : thandle);
 begin
 begin
-  if do_isdevice(h) then
+  if (h=StdInputHandle) or (h=StdOutputHandle) or (h=StdErrorHandle) then
    exit;
    exit;
   if CloseHandle(h)=0 then
   if CloseHandle(h)=0 then
     Errno2InOutRes(GetLastError);
     Errno2InOutRes(GetLastError);