mirror of
https://github.com/reactos/reactos.git
synced 2025-05-09 03:37:08 +00:00
[NTVDM]
Fix the calculation of the executable's base size. svn path=/trunk/; revision=67587
This commit is contained in:
parent
6dede8eba6
commit
17fd1cc052
1 changed files with 2 additions and 1 deletions
|
@ -409,7 +409,8 @@ DWORD DosLoadExecutable(IN DOS_EXEC_TYPE LoadType,
|
||||||
Header = (PIMAGE_DOS_HEADER)Address;
|
Header = (PIMAGE_DOS_HEADER)Address;
|
||||||
|
|
||||||
/* Get the base size of the file, in paragraphs (rounded up) */
|
/* Get the base size of the file, in paragraphs (rounded up) */
|
||||||
BaseSize = (((Header->e_cp - 1) * 512) + Header->e_cblp + 0x0F) >> 4;
|
BaseSize = (((Header->e_cp - (Header->e_cblp != 0)) * 512)
|
||||||
|
+ Header->e_cblp - Header->e_cparhdr + 0x0F) >> 4;
|
||||||
|
|
||||||
if (LoadType != DOS_LOAD_OVERLAY)
|
if (LoadType != DOS_LOAD_OVERLAY)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue