KYRA: Get rid of local static non-POD object.

This fixes crashes with the plugins branch for dhewg.

svn-id: r52579
This commit is contained in:
Johannes Schickel 2010-09-05 22:56:25 +00:00
parent b6663bb942
commit f69bfaf355
2 changed files with 3 additions and 3 deletions

View File

@ -387,6 +387,7 @@ protected:
bool canSaveGameStateCurrently() { return _isSaveAllowed; }
const char *getSavegameFilename(int num);
Common::String _savegameFilename;
static Common::String getSavegameFilename(const Common::String &target, int num);
bool saveFileLoadable(int slot);

View File

@ -224,9 +224,8 @@ Common::WriteStream *KyraEngine_v1::openSaveForWriting(const char *filename, con
}
const char *KyraEngine_v1::getSavegameFilename(int num) {
static Common::String filename;
filename = getSavegameFilename(_targetName, num);
return filename.c_str();
_savegameFilename = getSavegameFilename(_targetName, num);
return _savegameFilename.c_str();
}
Common::String KyraEngine_v1::getSavegameFilename(const Common::String &target, int num) {