[Scummvm-cvs-logs] scummvm master -> c9156d369f386645a28e2d845bb6b6969e91f1bc

digitall digitall at scummvm.org
Thu Jun 2 05:00:24 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c9156d369f TINSEL: Replace snprintf() usage with Common::String::format()


Commit: c9156d369f386645a28e2d845bb6b6969e91f1bc
    https://github.com/scummvm/scummvm/commit/c9156d369f386645a28e2d845bb6b6969e91f1bc
Author: D G Turner (digitall at scummvm.org)
Date: 2011-06-01T19:58:27-07:00

Commit Message:
TINSEL: Replace snprintf() usage with Common::String::format()

Safer and less portability issues.

Changed paths:
    engines/tinsel/tinsel.cpp



diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 6c1898b..80f02ff 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -886,9 +886,7 @@ TinselEngine::~TinselEngine() {
 }
 
 Common::String TinselEngine::getSavegameFilename(int16 saveNum) const {
-	char filename[256];
-	snprintf(filename, 256, "%s.%03d", getTargetName().c_str(), saveNum);
-	return filename;
+	return Common::String::format("%s.%03d", getTargetName().c_str(), saveNum);
 }
 
 Common::Error TinselEngine::run() {






More information about the Scummvm-git-logs mailing list