From a2c671da977acda9f9503413fb38490dcceda76d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 21 Jan 2009 20:00:26 +0000 Subject: 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 --- engines/sword1/control.cpp | 2 ++ 1 file changed, 2 insertions(+) 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) { -- cgit v1.2.3