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

digitall digitall at scummvm.org
Thu Jun 2 19:33:07 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:
da1f4e431d LURE: Replace snprintf() usage with Common::String::format()


Commit: da1f4e431d09721a4937241ef529ba5b6a26ca33
    https://github.com/scummvm/scummvm/commit/da1f4e431d09721a4937241ef529ba5b6a26ca33
Author: D G Turner (digitall at scummvm.org)
Date: 2011-06-02T10:31:04-07:00

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

Safer and less portability issues.

Changed paths:
    engines/lure/detection.cpp



diff --git a/engines/lure/detection.cpp b/engines/lure/detection.cpp
index 4d03148..ced0be0 100644
--- a/engines/lure/detection.cpp
+++ b/engines/lure/detection.cpp
@@ -271,11 +271,8 @@ SaveStateList LureMetaEngine::listSaves(const char *target) const {
 int LureMetaEngine::getMaximumSaveSlot() const { return 999; }
 
 void LureMetaEngine::removeSaveState(const char *target, int slot) const {
-	char extension[6];
-	snprintf(extension, sizeof(extension), ".%03d", slot);
-
 	Common::String filename = target;
-	filename += extension;
+	filename += Common::String::format(".%03d", slot);
 
 	g_system->getSavefileManager()->removeSavefile(filename);
 }






More information about the Scummvm-git-logs mailing list