diff options
Diffstat (limited to 'engines/gargoyle/streams.cpp')
-rw-r--r-- | engines/gargoyle/streams.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/gargoyle/streams.cpp b/engines/gargoyle/streams.cpp index a8c85a177f..0dc82eda10 100644 --- a/engines/gargoyle/streams.cpp +++ b/engines/gargoyle/streams.cpp @@ -536,6 +536,9 @@ FileStream::FileStream(Streams *streams, frefid_t fref, glui32 fmode, glui32 roc SavegameHeader header; if (!readSavegameHeader(_inStream, header)) error("Invalid savegame"); + if (header._interpType != g_vm->getInterpreterType() || header._language != g_vm->getLanguage() + || header._md5 != g_vm->getGameMD5()) + error("Savegame is for a different game"); g_vm->_events->setTotalPlayTicks(header._totalFrames); } @@ -989,10 +992,6 @@ bool FileStream::readSavegameHeader(Common::SeekableReadStream *stream, Savegame header._language = stream->readByte(); header._md5 = readString(stream); - if (header._interpType != g_vm->getInterpreterType() || header._language != g_vm->getLanguage() - || header._md5 != g_vm->getGameMD5()) - return false; - // Read in name header._saveName = readString(stream); |