kernel32: Fix the base DOS memory address when the low 64K are not accessible.

This commit is contained in:
Alexandre Julliard 2008-11-24 13:45:42 +01:00
parent d2c8bfbf8a
commit a488ee8e7a
1 changed files with 3 additions and 2 deletions

View File

@ -170,15 +170,16 @@ BOOL DOSMEM_Init(void)
ExitProcess(1); ExitProcess(1);
} }
DOSMEM_dosmem = addr; if (addr <= (void *)DOSMEM_64KB)
if (!addr)
{ {
DOSMEM_dosmem = 0;
DOSMEM_protect = DOSMEM_64KB; DOSMEM_protect = DOSMEM_64KB;
sysmem = (char *)0xf0000; /* store sysmem in high addresses for now */ sysmem = (char *)0xf0000; /* store sysmem in high addresses for now */
} }
else else
{ {
WARN( "First megabyte not available for DOS address space.\n" ); WARN( "First megabyte not available for DOS address space.\n" );
DOSMEM_dosmem = addr;
DOSMEM_protect = 0; DOSMEM_protect = 0;
sysmem = DOSMEM_dosmem; sysmem = DOSMEM_dosmem;
} }