[Scummvm-cvs-logs] scummvm master -> 37886ba7bb53b1df1bf69c3e43c13b01639a6f80
digitall
digitall at scummvm.org
Thu Jun 2 04:05:20 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:
37886ba7bb CRUISE: Replace snprintf() usage with Common::String::format()
Commit: 37886ba7bb53b1df1bf69c3e43c13b01639a6f80
https://github.com/scummvm/scummvm/commit/37886ba7bb53b1df1bf69c3e43c13b01639a6f80
Author: D G Turner (digitall at scummvm.org)
Date: 2011-06-01T19:03:21-07:00
Commit Message:
CRUISE: Replace snprintf() usage with Common::String::format()
Safer and less portability issues.
Changed paths:
engines/cruise/menu.cpp
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index 4078585..bb81797 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -225,13 +225,10 @@ static void handleSaveLoad(bool saveFlag) {
Common::String result(dialog->getResultString());
if (result.empty()) {
// If the user was lazy and entered no save name, come up with a default name.
- char buf[20];
- snprintf(buf, 20, "Save %d", slot + 1);
-
- _vm->saveGameState(slot, buf);
- } else {
- _vm->saveGameState(slot, result.c_str());
+ result = Common::String::format("Save %d", slot + 1);
}
+
+ _vm->saveGameState(slot, result.c_str());
}
}
More information about the Scummvm-git-logs
mailing list