diff options
-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()); } } |