From deb328f3196db7282ec14bdbadaf26ef94e4382b Mon Sep 17 00:00:00 2001 From: Ulf Wohlers Date: Mon, 24 Feb 2003 15:42:21 +0000 Subject: [PATCH] copy psp file table to child processes Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@688 --- src/dos/dos_execute.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dos/dos_execute.cpp b/src/dos/dos_execute.cpp index d435d574..c7339972 100644 --- a/src/dos/dos_execute.cpp +++ b/src/dos/dos_execute.cpp @@ -232,8 +232,10 @@ bool DOS_Execute(char * name,PhysPt block_pt,Bit8u flags) { if ((head.signature!=MAGIC1) && (head.signature!=MAGIC2)) iscom=true; else { headersize=head.headersize*16; - imagesize=(head.pages)*512-headersize; + imagesize=(head.pages-1)*512-headersize; if (head.extrabytes) imagesize += head.extrabytes % 512; + // always load st least 512 Bytes (dos cache/dos bug?) + if (imagesize+headersize<512) imagesize = 512-headersize; } if (flags!=OVERLAY) { /* Create an environment block */