From 07be3858f16934eb0bb3aa63ba1cebe48f049de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Sun, 13 Nov 2005 15:14:49 +0000 Subject: [PATCH] don't change type field when resizing dos memory just before the last block that is marked allocated Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2376 --- src/dos/dos_memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dos/dos_memory.cpp b/src/dos/dos_memory.cpp index 6a3c47a8..ebd1ab01 100644 --- a/src/dos/dos_memory.cpp +++ b/src/dos/dos_memory.cpp @@ -215,7 +215,7 @@ bool DOS_ResizeMemory(Bit16u segment,Bit16u * blocks) { /* at this point: *blocks==total (fits) or *blocks>total, in the second case resize block to maximum */ - if (mcb.GetType()!=0x5a) { + if ((mcb_next.GetPSPSeg()==MCB_FREE) && (mcb.GetType()!=0x5a)) { /* adjust type of joined MCB */ mcb.SetType(mcb_next.GetType()); }