aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorD G Turner2011-06-02 03:03:21 +0100
committerD G Turner2011-06-02 03:03:21 +0100
commit37886ba7bb53b1df1bf69c3e43c13b01639a6f80 (patch)
tree81349b6835178757112984e447bd815a31e1b292 /engines/cruise
parent889f5d119a419b5f7f98341a8ae8d0159f9cf820 (diff)
downloadscummvm-rg350-37886ba7bb53b1df1bf69c3e43c13b01639a6f80.tar.gz
scummvm-rg350-37886ba7bb53b1df1bf69c3e43c13b01639a6f80.tar.bz2
scummvm-rg350-37886ba7bb53b1df1bf69c3e43c13b01639a6f80.zip
CRUISE: Replace snprintf() usage with Common::String::format()
Safer and less portability issues.
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/menu.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index 407858574c..bb81797216 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());
}
}