From 29fa5037bf109689f4111d45df904ee6def51dd7 Mon Sep 17 00:00:00 2001 From: riccardom Date: Sun, 15 May 2011 17:47:03 +0000 Subject: [PATCH] NDSSystem: call fillGap() after loading romdata in NDS_LoadRom !WINDOWS --- desmume/src/NDSSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 06bdf2e51..a2bad71dd 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -583,14 +583,14 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename) return -1; } - gameInfo.resize(size); - // Make sure old ROM is freed first(at least this way we won't be eating // up a ton of ram before the old ROM is freed) if(MMU.CART_ROM != MMU.UNUSED_RAM) NDS_FreeROM(); + gameInfo.resize(size); ret = reader->Read(file, gameInfo.romdata, size); + gameInfo.fillGap(); reader->DeInit(file); //decrypt if necessary..