diff options
author | Thierry Crozat | 2010-09-16 19:50:15 +0000 |
---|---|---|
committer | Thierry Crozat | 2010-09-16 19:50:15 +0000 |
commit | 44610eb037a1d087b83311047ec62e515ca0ca1d (patch) | |
tree | c1de13f041787d559cec6ed36de37f182da86e6e /engines/agos | |
parent | 454528f594e446ea8c90cc32ef1669e739f467ac (diff) | |
download | scummvm-rg350-44610eb037a1d087b83311047ec62e515ca0ca1d.tar.gz scummvm-rg350-44610eb037a1d087b83311047ec62e515ca0ca1d.tar.bz2 scummvm-rg350-44610eb037a1d087b83311047ec62e515ca0ca1d.zip |
I18N: fix a buffer size issue with translated save/load strings in AGOS
svn-id: r52751
Diffstat (limited to 'engines/agos')
-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 c461d74a4e..a734c4bfae 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -147,14 +147,14 @@ void AGOSEngine::quickLoadOrSave() { } bool success; - char buf[60]; + char buf[80]; char *filename = genSaveName(_saveLoadSlot); if (_saveLoadType == 2) { Subroutine *sub; success = loadGame(genSaveName(_saveLoadSlot)); if (!success) { - sprintf(buf, _("Failed to load game state from file:\n\n%s"), filename); + snprintf(buf, sizeof(buf), _("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) - sprintf(buf, _("Failed to save game state to file:\n\n%s"), filename); + snprintf(buf, sizeof(buf), _("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) { - sprintf(buf, _("Successfully saved game state in file:\n\n%s"), filename); + snprintf(buf, sizeof(buf), _("Successfully saved game state in file:\n\n%s"), filename); GUI::TimedMessageDialog dialog(buf, 1500); dialog.runModal(); |