diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/saveload.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index a734c4bfae..ffa95506c5 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -147,14 +147,14 @@ void AGOSEngine::quickLoadOrSave() { } bool success; - char buf[80]; + Common::String buf; char *filename = genSaveName(_saveLoadSlot); if (_saveLoadType == 2) { Subroutine *sub; success = loadGame(genSaveName(_saveLoadSlot)); if (!success) { - snprintf(buf, sizeof(buf), _("Failed to load game state from file:\n\n%s"), filename); + buf = Common::String::printf(_("Failed to load game state from file:\n\n%s"), filename); } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { drawIconArray(2, me(), 0, 0); setBitFlag(97, true); @@ -189,7 +189,7 @@ void AGOSEngine::quickLoadOrSave() { } else { success = saveGame(_saveLoadSlot, _saveLoadName); if (!success) - snprintf(buf, sizeof(buf), _("Failed to save game state to file:\n\n%s"), filename); + buf = Common::String::printf(_("Failed to save game state to file:\n\n%s"), filename); } if (!success) { @@ -197,7 +197,7 @@ void AGOSEngine::quickLoadOrSave() { dialog.runModal(); } else if (_saveLoadType == 1) { - snprintf(buf, sizeof(buf), _("Successfully saved game state in file:\n\n%s"), filename); + buf = Common::String::printf(_("Successfully saved game state in file:\n\n%s"), filename); GUI::TimedMessageDialog dialog(buf, 1500); dialog.runModal(); |