From 0ce8400841443ce9c96f3f96e5fcd508eb4fd92a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 12 Nov 2008 10:16:06 +0000 Subject: Patch #2258906: SCUMM: fix builtin load game screen for v1-v5 svn-id: r35013 --- engines/scumm/script_v5.cpp | 7 ++++--- 1 file 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); -- cgit v1.2.3