diff options
author | upthorn | 2012-04-15 17:29:41 -0700 |
---|---|---|
committer | upthorn | 2012-04-16 13:52:36 -0700 |
commit | 9c70954f648d86863e260d0b174afd8749319338 (patch) | |
tree | b7e3f0c10b7ea100e8f8910c4ec63cff134885a4 | |
parent | 9e5015e631ed070b6a500fac1734b6a4e8c04fea (diff) | |
download | scummvm-rg350-9c70954f648d86863e260d0b174afd8749319338.tar.gz scummvm-rg350-9c70954f648d86863e260d0b174afd8749319338.tar.bz2 scummvm-rg350-9c70954f648d86863e260d0b174afd8749319338.zip |
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.
-rw-r--r-- | engines/drascula/detection.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 07f1634d87..6e38d49b94 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -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++; |