[Scummvm-cvs-logs] SF.net SVN: scummvm:[52751] scummvm/trunk/engines/agos/saveload.cpp
criezy at users.sourceforge.net
criezy at users.sourceforge.net
Thu Sep 16 21:50:15 CEST 2010
Revision: 52751
http://scummvm.svn.sourceforge.net/scummvm/?rev=52751&view=rev
Author: criezy
Date: 2010-09-16 19:50:15 +0000 (Thu, 16 Sep 2010)
Log Message:
-----------
I18N: fix a buffer size issue with translated save/load strings in AGOS
Modified Paths:
--------------
scummvm/trunk/engines/agos/saveload.cpp
Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp 2010-09-16 17:37:54 UTC (rev 52750)
+++ scummvm/trunk/engines/agos/saveload.cpp 2010-09-16 19:50:15 UTC (rev 52751)
@@ -147,14 +147,14 @@
}
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 @@
} 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 @@
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();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list