From 25a243ed74e6a8aa1e8d192146ad98a6c0bbe24c Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Tue, 10 Jun 2003 11:41:17 +0000 Subject: [PATCH] Check if files are withing MAX_FILES limits Added buffers to lists of lists. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1048 --- src/dos/dos_classes.cpp | 8 +++++++- src/dos/dos_tables.cpp | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/dos/dos_classes.cpp b/src/dos/dos_classes.cpp index 6f622b3e..31283fde 100644 --- a/src/dos/dos_classes.cpp +++ b/src/dos/dos_classes.cpp @@ -73,6 +73,12 @@ void DOS_InfoBlock::SetfirstFileTable(RealPt _first_table){ sSave(sDIB,firstFileTable,_first_table); } +void DOS_InfoBlock::SetBuffers(Bit16u x,Bit16u y) { + sSave(sDIB,buffers_x,x); + sSave(sDIB,buffers_y,y); + +} + RealPt DOS_InfoBlock::GetPointer(void) { return RealMake(seg,offsetof(sDIB,firstDPB)); @@ -164,7 +170,7 @@ void DOS_PSP::CopyFileTable(DOS_PSP* srcpsp,bool createchildpsp) if(createchildpsp) { //copy obeying not inherit flag.(but dont duplicate them) bool allowCopy = (handle==0) || ((handle>0) && (FindEntryByHandle(handle)==0xff)); - if(Files[handle] && !(Files[handle]->flags & DOS_NOT_INHERIT) && allowCopy) + if((handleflags & DOS_NOT_INHERIT) && allowCopy) { SetFileHandle(i,handle); } diff --git a/src/dos/dos_tables.cpp b/src/dos/dos_tables.cpp index 8332e17e..e9035193 100644 --- a/src/dos/dos_tables.cpp +++ b/src/dos/dos_tables.cpp @@ -55,12 +55,14 @@ void DOS_SetupTables(void) { for (i=0;i