فهرست منبع

* fixed fpdup2() for non-text files

git-svn-id: trunk@1557 -
Jonas Maebe 20 سال پیش
والد
کامیت
5cd3f3272c
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      rtl/unix/bunxovl.inc

+ 4 - 0
rtl/unix/bunxovl.inc

@@ -278,8 +278,12 @@ Function FpDup2(var oldfile,newfile:file):cint;
 {
   Copies the filedescriptor oldfile to newfile
 }
+var
+  tmphandle : word;
 begin
+  tmphandle := filerec(newfile).handle;
   filerec(newfile):=filerec(oldfile);
+  filerec(newfile).handle := tmphandle;
   fpDup2:=fpDup2(filerec(oldfile).handle,filerec(newfile).handle);
 end;