[Scummvm-cvs-logs] SF.net SVN: scummvm:[40438] scummvm/trunk/engines/agi/saveload.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun May 10 23:27:58 CEST 2009
Revision: 40438
http://scummvm.svn.sourceforge.net/scummvm/?rev=40438&view=rev
Author: lordhoto
Date: 2009-05-10 21:27:57 +0000 (Sun, 10 May 2009)
Log Message:
-----------
Support target names of any length.
Modified Paths:
--------------
scummvm/trunk/engines/agi/saveload.cpp
Modified: scummvm/trunk/engines/agi/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agi/saveload.cpp 2009-05-10 21:20:33 UTC (rev 40437)
+++ scummvm/trunk/engines/agi/saveload.cpp 2009-05-10 21:27:57 UTC (rev 40438)
@@ -508,9 +508,12 @@
#define NUM_VISIBLE_SLOTS 12
const char *AgiEngine::getSavegameFilename(int num) {
- static char saveLoadSlot[100];
- sprintf(saveLoadSlot, "%s.%.3d", _targetName.c_str(), num);
- return saveLoadSlot;
+ static Common::String saveLoadSlot;
+ char extension[5];
+ snprintf(extension, sizeof(extension), ".%3d", num);
+
+ saveLoadSlot = _targetName + extension;
+ return saveLoadSlot.c_str();
}
void AgiEngine::getSavegameDescription(int num, char *buf, bool showEmpty) {
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