aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorFilippos Karapetis2011-09-25 18:36:33 +0300
committerFilippos Karapetis2011-09-25 18:36:33 +0300
commitc02603fce209a3923216ff3a5ae8f5120a09b40d (patch)
tree3f63f04e9953154e51b735e6637cbd8b8f12b4f3 /engines/agi
parent18a0214672c34411bbbff6be383425f7a4c38544 (diff)
downloadscummvm-rg350-c02603fce209a3923216ff3a5ae8f5120a09b40d.tar.gz
scummvm-rg350-c02603fce209a3923216ff3a5ae8f5120a09b40d.tar.bz2
scummvm-rg350-c02603fce209a3923216ff3a5ae8f5120a09b40d.zip
AGI: Replaced odd usage of sprintf() with strcpy()
Fixes an odd bug with savegame names being truncated in MSVC
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/saveload.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 28dd0a53dd..e62b9d4d69 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -557,7 +557,7 @@ void AgiEngine::getSavegameDescription(int num, char *buf, bool showEmpty) {
Common::InSaveFile *in;
debugC(4, kDebugLevelMain | kDebugLevelSavegame, "Current game id is %s", _targetName.c_str());
- sprintf(fileName, "%s", getSavegameFilename(num));
+ strcpy(fileName, getSavegameFilename(num));
if (!(in = _saveFileMan->openForLoading(fileName))) {
debugC(4, kDebugLevelMain | kDebugLevelSavegame, "File %s does not exist", fileName);
@@ -852,7 +852,7 @@ int AgiEngine::saveGameDialog() {
return errOK;
}
- sprintf(fileName, "%s", getSavegameFilename(_firstSlot + slot));
+ strcpy(fileName, getSavegameFilename(_firstSlot + slot));
debugC(8, kDebugLevelMain | kDebugLevelResources, "file is [%s]", fileName);
// Make sure all graphics was blitted to screen. This fixes bug