From 429afd87f62c542abb914486d89e1ad1c776cc04 Mon Sep 17 00:00:00 2001 From: mtabachenko Date: Tue, 12 Nov 2013 10:32:51 +0000 Subject: [PATCH] core: - fix load slot2 savestate from old savestates created before [r4867] --- desmume/src/saves.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desmume/src/saves.cpp b/desmume/src/saves.cpp index 7b994206c..2bd8fa484 100644 --- a/desmume/src/saves.cpp +++ b/desmume/src/saves.cpp @@ -408,9 +408,10 @@ static bool s_slot2_loadstate(EMUFILE* is, int size) //version 0: if(version >= 0) { - u8 slotID = is->read32le(); NDS_SLOT2_TYPE slotType = NDS_SLOT2_AUTO; - slot2_getTypeByID(slotID, slotType); + u8 slotID = is->read32le(); + if (version == 0) + slot2_getTypeByID(slotID, slotType); slot2_Change(slotType);