aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-01-21 20:00:26 +0000
committerTorbjörn Andersson2009-01-21 20:00:26 +0000
commita2c671da977acda9f9503413fb38490dcceda76d (patch)
treee16012ba245bda090c787d418ff668fb0bf60bdf
parent248605800e97f75b2c048c4ed4200fa409df57be (diff)
downloadscummvm-rg350-a2c671da977acda9f9503413fb38490dcceda76d.tar.gz
scummvm-rg350-a2c671da977acda9f9503413fb38490dcceda76d.tar.bz2
scummvm-rg350-a2c671da977acda9f9503413fb38490dcceda76d.zip
Clear the list of savegames before re-populating it. Otherwise, even save names
that have been entered before cancelling the dialog will remain in it. svn-id: r35987
-rw-r--r--engines/sword1/control.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 575ff2f0bc..7022aa89c7 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -724,6 +724,8 @@ void Control::readSavegameDescriptions(void) {
Common::StringList filenames = _saveFileMan->listSavefiles(pattern.c_str());
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
+ _saveNames.clear();
+
int num = 0;
int slotNum = 0;
for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {