Support target names of any length.

svn-id: r40438
This commit is contained in:
Johannes Schickel 2009-05-10 21:27:57 +00:00
parent 2a485abd6d
commit 7604301c30

View file

@ -508,9 +508,12 @@ int AgiEngine::loadGame(const char *fileName, bool checkId) {
#define NUM_VISIBLE_SLOTS 12
const char *AgiEngine::getSavegameFilename(int num) {
static char saveLoadSlot[100];
sprintf(saveLoadSlot, "%s.%.3d", _targetName.c_str(), num);
return saveLoadSlot;
static Common::String saveLoadSlot;
char extension[5];
snprintf(extension, sizeof(extension), ".%3d", num);
saveLoadSlot = _targetName + extension;
return saveLoadSlot.c_str();
}
void AgiEngine::getSavegameDescription(int num, char *buf, bool showEmpty) {