diff options
author | Max Horn | 2008-11-12 10:16:06 +0000 |
---|---|---|
committer | Max Horn | 2008-11-12 10:16:06 +0000 |
commit | 0ce8400841443ce9c96f3f96e5fcd508eb4fd92a (patch) | |
tree | 7180f8d861f10589e7ccac6f7ebaca72b86d3fa6 /engines/scumm | |
parent | 181a44fc21b0627d2cf247fdb7a31e0f8eedecb6 (diff) | |
download | scummvm-rg350-0ce8400841443ce9c96f3f96e5fcd508eb4fd92a.tar.gz scummvm-rg350-0ce8400841443ce9c96f3f96e5fcd508eb4fd92a.tar.bz2 scummvm-rg350-0ce8400841443ce9c96f3f96e5fcd508eb4fd92a.zip |
Patch #2258906: SCUMM: fix builtin load game screen for v1-v5
svn-id: r35013
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/script_v5.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index 52ac451e4c..ce5ac4f323 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -1257,17 +1257,18 @@ void ScummEngine_v5::o5_saveLoadGame() { result = 2; // failed to save break; case 0xC0: // test if save exists + { Common::InSaveFile *file; bool avail_saves[100]; - char filename[256]; listSavegames(avail_saves, ARRAYSIZE(avail_saves)); - makeSavegameName(filename, slot, false); - if (avail_saves[slot] && (file = _saveFileMan->openForLoading(filename))) { + Common::String filename = makeSavegameName(slot, false); + if (avail_saves[slot] && (file = _saveFileMan->openForLoading(filename.c_str()))) { result = 6; // save file exists delete file; } else result = 7; // save file does not exist + } break; default: error("o5_saveLoadGame: unknown subopcode %d", _opcode); |