In DosTerminateProcess, McbSegment is the segment of the MCB itself, not the data
it contains.


svn path=/trunk/; revision=67556
This commit is contained in:
Aleksandar Andrejevic 2015-05-05 03:52:25 +00:00
parent 6e72d71daa
commit 4e51a1b77e

View file

@ -839,7 +839,7 @@ VOID DosTerminateProcess(WORD Psp, BYTE ReturnCode, WORD KeepResident)
if (KeepResident)
{
/* Check if this is the PSP block and we should reduce its size */
if (McbSegment == Psp && KeepResident < CurrentMcb->Size)
if ((McbSegment + 1) == Psp && KeepResident < CurrentMcb->Size)
{
/* Reduce the size of the block */
DosResizeMemory(McbSegment + 1, KeepResident, NULL);