mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 08:25:35 +00:00
I18N: fix a buffer size issue with translated save/load strings in AGOS
svn-id: r52751
This commit is contained in:
parent
454528f594
commit
44610eb037
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user