From 9c70954f648d86863e260d0b174afd8749319338 Mon Sep 17 00:00:00 2001 From: upthorn Date: Sun, 15 Apr 2012 17:29:41 -0700 Subject: 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. --- engines/drascula/detection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/drascula') 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++; -- cgit v1.2.3