dont duplicate handles in psp if filetable is copied (except null-handles)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1042
This commit is contained in:
parent
e18eebf29d
commit
cf0b2cbd6c
1 changed files with 2 additions and 1 deletions
|
@ -163,7 +163,8 @@ void DOS_PSP::CopyFileTable(DOS_PSP* srcpsp,bool createchildpsp)
|
|||
Bit8u handle = srcpsp->GetFileHandle(i);
|
||||
if(createchildpsp)
|
||||
{ //copy obeying not inherit flag.(but dont duplicate them)
|
||||
if(Files[handle] && !(Files[handle]->flags & DOS_NOT_INHERIT) && (FindEntryByHandle(handle)==0xff))
|
||||
bool allowCopy = (handle==0) || ((handle>0) && (FindEntryByHandle(handle)==0xff));
|
||||
if(Files[handle] && !(Files[handle]->flags & DOS_NOT_INHERIT) && allowCopy)
|
||||
{
|
||||
SetFileHandle(i,handle);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue