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

digitall digitall at scummvm.org
Thu Jun 2 22:18:15 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:
bd58c9459d SKY: Replace snprintf() usage with Common::String::format()


Commit: bd58c9459dc3509dcefbe1ee7462eb5ab3954f6f
    https://github.com/scummvm/scummvm/commit/bd58c9459dc3509dcefbe1ee7462eb5ab3954f6f
Author: D G Turner (digitall at scummvm.org)
Date: 2011-06-02T13:14:58-07:00

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

Safer and less portability issues.

Changed paths:
    engines/sky/detection.cpp



diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index e974f5a..f3cce06 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -151,9 +151,7 @@ GameList SkyMetaEngine::detectGames(const Common::FSList &fslist) const {
 		while (sv->dinnerTableEntries) {
 			if (dinnerTableEntries == sv->dinnerTableEntries &&
 				(sv->dataDiskSize == dataDiskSize || sv->dataDiskSize == -1)) {
-				char buf[32];
-				snprintf(buf, sizeof(buf), "v0.0%d %s", sv->version, sv->extraDesc);
-				dg.updateDesc(buf);
+				dg.updateDesc(Common::String::format("v0.0%d %s", sv->version, sv->extraDesc).c_str());
 				dg.setGUIOptions(sv->guioptions);
 				break;
 			}






More information about the Scummvm-git-logs mailing list