diff options
-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(); |