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:
parent
40a4d72267
commit
e18eebf29d
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue