diff options
author | D G Turner | 2011-06-02 03:03:21 +0100 |
---|---|---|
committer | D G Turner | 2011-06-02 03:03:21 +0100 |
commit | 37886ba7bb53b1df1bf69c3e43c13b01639a6f80 (patch) | |
tree | 81349b6835178757112984e447bd815a31e1b292 /engines/cruise | |
parent | 889f5d119a419b5f7f98341a8ae8d0159f9cf820 (diff) | |
download | scummvm-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.cpp | 9 |
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()); } } |