diff options
Diffstat (limited to 'engines/dialogs.cpp')
-rw-r--r-- | engines/dialogs.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 75b2ca9296..f9b1c1e8b5 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -227,9 +227,9 @@ void MainMenuDialog::save() { Common::String result(_saveDialog->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); - _engine->saveGameState(slot, buf); + Common::String buf; + buf = Common::String::format("Save %d", slot + 1); + _engine->saveGameState(slot, buf.c_str()); } else { _engine->saveGameState(slot, result.c_str()); } |