1
0
Fork 0

Dont dublicate handles in psp when filetable is copied

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1041
This commit is contained in:
Ulf Wohlers 2003-06-05 09:52:13 +00:00
parent 40a4d72267
commit e18eebf29d

View file

@ -162,8 +162,8 @@ void DOS_PSP::CopyFileTable(DOS_PSP* srcpsp,bool createchildpsp)
for (Bit16u i=0;i<20;i++) {
Bit8u handle = srcpsp->GetFileHandle(i);
if(createchildpsp)
{ //copy obeying not inherit flag.
if(Files[handle] && !(Files[handle]->flags & DOS_NOT_INHERIT))
{ //copy obeying not inherit flag.(but dont duplicate them)
if(Files[handle] && !(Files[handle]->flags & DOS_NOT_INHERIT) && (FindEntryByHandle(handle)==0xff))
{
SetFileHandle(i,handle);
}