From 07220529dc8978b2c2e94662ae9b5a2ec910369e Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 20 Oct 2008 21:47:46 +0000 Subject: Fix - at least partially - the list of savegames for the launcher's load dialog. But I suspect there are still bugs lurking in that code. I really dislike how Broken Sword 1 handles savegames... svn-id: r34829 --- engines/sword1/sword1.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 4b402ffe97..378d3b84bb 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -211,8 +211,13 @@ SaveStateList SwordMetaEngine::listSaves(const char *target) const { uint8 stop; char saveDesc[32]; do { - // Obtain the last digit of the filename, since they correspond to the save slot - int slotNum = atoi(file->c_str() + file->size() - 1); + if (file->compareToIgnoreCase("SAVEGAME.INF") == 0) { + file++; + continue; + } + + // Obtain the last 3 digits of the filename, since they correspond to the save slot + int slotNum = atoi(file->c_str() + file->size() - 3); uint pos = 0; do { -- cgit v1.2.3