From b7812345765d2e69ff49de206aac61c86380c554 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 14 Sep 2014 17:36:25 +0000 Subject: [PATCH] fix bug loading gba roms with no .sav file (fixes bug #1431) --- desmume/src/addons/slot2_gbagame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desmume/src/addons/slot2_gbagame.cpp b/desmume/src/addons/slot2_gbagame.cpp index 6a333a29d..29f08704e 100644 --- a/desmume/src/addons/slot2_gbagame.cpp +++ b/desmume/src/addons/slot2_gbagame.cpp @@ -373,7 +373,6 @@ public: // Load the GBA cartridge SRAM. inf = new EMUFILE_FILE(GBACartridge_SRAMPath, "rb+"); - inf->EnablePositionCache(); fSRAM = inf; if(fSRAM->fail()) { @@ -383,6 +382,7 @@ public: } else { + inf->EnablePositionCache(); sramSize = fSRAM->size(); printf("Scanning GBA rom to ID save type\n"); saveType = scanSaveTypeGBA();