- fixed memory limit check

This commit is contained in:
Volker Ruppert 2004-12-04 13:48:53 +00:00
parent 301ffc2a7f
commit b9ba811da4

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: memory.cc,v 1.37 2004-11-14 14:06:43 vruppert Exp $
// $Id: memory.cc,v 1.38 2004-12-04 13:48:53 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -70,7 +70,7 @@ BX_MEM_C::writePhysicalPage(BX_CPU_C *cpu, Bit32u addr, unsigned len, void *data
cpu->iCache.decWriteStamp(a20addr);
#endif
if ( a20addr <= BX_MEM_THIS len ) {
if ( (a20addr + len) <= BX_MEM_THIS len ) {
// all of data is within limits of physical memory
if ( (a20addr & 0xfff80000) != 0x00080000 ) {
if (len == 4) {