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
This commit is contained in:
Torbjörn Andersson 2009-01-21 20:00:26 +00:00
parent 248605800e
commit a2c671da97

View File

@ -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) {