diff options
author | Eugene Sandulenko | 2016-09-19 10:13:47 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-19 18:13:31 +0200 |
commit | 26142799adf6ef4e07a3a91c413f40c7253aa3f8 (patch) | |
tree | d6b760cc7b9a9294c18e130c4054776de39aae0e /engines/fullpipe | |
parent | 3bf4f3fcbe342d5ddb805e66de1df29541541410 (diff) | |
download | scummvm-rg350-26142799adf6ef4e07a3a91c413f40c7253aa3f8.tar.gz scummvm-rg350-26142799adf6ef4e07a3a91c413f40c7253aa3f8.tar.bz2 scummvm-rg350-26142799adf6ef4e07a3a91c413f40c7253aa3f8.zip |
FULLPIPE: Correct slot number on loading
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/modal.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/stateloader.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index 5f8afbc761..cceec4a852 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -1622,7 +1622,7 @@ char *ModalSaveGame::getSaveName() { if (_queryRes < 0) return 0; - return _files[_queryRes]->filename; + return _files[_queryRes - 1]->filename; } bool ModalSaveGame::getFileInfo(int slot, FileInfo *fileinfo) { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 3d74e93566..588a366df7 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -42,6 +42,11 @@ void GameLoader::readSavegame(const char *fname) { SaveHeader header; Common::InSaveFile *saveFile = g_system->getSavefileManager()->openForLoading(fname); + if (!saveFile) { + warning("Cannot open save %s for loading", fname); + return; + } + header.version = saveFile->readUint32LE(); saveFile->read(header.magic, 32); header.updateCounter = saveFile->readUint32LE(); |