diff options
author | Adrian Frühwirth | 2018-04-22 22:13:45 +0200 |
---|---|---|
committer | Adrian Frühwirth | 2018-04-22 22:42:40 +0200 |
commit | b1b83ac9547e209da3d588487ee6427b1c9d2995 (patch) | |
tree | 01e896e50db34f2350765999f6e7c73cad3958b8 /engines/titanic | |
parent | ab3f397e2d3f68eddc0cf66b67ff781cbb2e399d (diff) | |
download | scummvm-rg350-b1b83ac9547e209da3d588487ee6427b1c9d2995.tar.gz scummvm-rg350-b1b83ac9547e209da3d588487ee6427b1c9d2995.tar.bz2 scummvm-rg350-b1b83ac9547e209da3d588487ee6427b1c9d2995.zip |
Revert "TITANIC: Fix memory leak due to save thumbnail changes"
This was a miss in commit 00e59a3122. The new parameter was supposed
to be called skipThumbnail and default to true instead.
For consistency's sake (the rest of the tree uses skipThumbnail, not
loadThumbnail) I'm reverting this and will separately update the
declaration to how it should have been from the beginning.
Thanks dreammaster!
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/core/project_item.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/detection.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp index 424562ffef..6da891c417 100644 --- a/engines/titanic/core/project_item.cpp +++ b/engines/titanic/core/project_item.cpp @@ -495,7 +495,7 @@ SaveStateList CProjectItem::getSavegameList(const Common::String &target) { return saveList; } -bool CProjectItem::readSavegameHeader(SimpleFile *file, TitanicSavegameHeader &header, bool loadThumbnail) { +bool CProjectItem::readSavegameHeader(SimpleFile *file, TitanicSavegameHeader &header, bool skipThumbnail) { char saveIdentBuffer[SAVEGAME_STR_SIZE + 1]; header._thumbnail = nullptr; header._totalFrames = 0; @@ -518,7 +518,7 @@ bool CProjectItem::readSavegameHeader(SimpleFile *file, TitanicSavegameHeader &h while ((ch = (char)file->readByte()) != '\0') header._saveName += ch; // Get the thumbnail - if (!Graphics::loadThumbnail(*file, header._thumbnail, !loadThumbnail)) + if (!Graphics::loadThumbnail(*file, header._thumbnail, skipThumbnail)) return false; // Read in save date/time diff --git a/engines/titanic/detection.cpp b/engines/titanic/detection.cpp index 07a17ae779..c98fbbdade 100644 --- a/engines/titanic/detection.cpp +++ b/engines/titanic/detection.cpp @@ -156,7 +156,7 @@ SaveStateDescriptor TitanicMetaEngine::querySaveMetaInfos(const char *target, in file.open(f); Titanic::TitanicSavegameHeader header; - if (!Titanic::CProjectItem::readSavegameHeader(&file, header, true)) { + if (!Titanic::CProjectItem::readSavegameHeader(&file, header, false)) { file.close(); return SaveStateDescriptor(); } |