* fixed fpdup2() for non-text files

git-svn-id: trunk@1557 -
This commit is contained in:
Jonas Maebe 2005-10-21 12:34:36 +00:00
parent f1af7cfe8f
commit 5cd3f3272c

View File

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