mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
DRASCULA: listSaves handles unsynced save index
This is a situation that would occur when a user copies drscula save files from one device to another, without copying the corresponding index, or copies the index without all corresponding save files.
This commit is contained in:
parent
9e5015e631
commit
9c70954f64
@ -306,7 +306,6 @@ public:
|
||||
SaveStateList saveList;
|
||||
int line = 1;
|
||||
for (size_t i = 0; i < slots.size(); i++) {
|
||||
|
||||
// ignore lines corresponding to unused saveslots
|
||||
for (; line < slots[i]; line++)
|
||||
epa->readLine();
|
||||
@ -314,6 +313,10 @@ public:
|
||||
// copy the name in the line corresponding to the save slot and truncate to 22 characters
|
||||
saveDesc = Common::String(epa->readLine().c_str(), 22);
|
||||
|
||||
// handle cases where the save directory and save index are detectably out of sync
|
||||
if (saveDesc == "*")
|
||||
saveDesc = "No name specified.";
|
||||
|
||||
// increment line number to keep it in sync with slot number
|
||||
line++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user