summaryrefslogtreecommitdiff
path: root/src/fios_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fios_gui.cpp')
-rw-r--r--src/fios_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 53bb606f3..a86bb7a22 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -771,14 +771,14 @@ public:
}
} else if (this->IsWidgetLowered(WID_SL_SAVE_GAME)) { // Save button clicked
if (this->abstract_filetype == FT_SAVEGAME || this->abstract_filetype == FT_SCENARIO) {
- FiosMakeSavegameName(_file_to_saveload.name, this->filename_editbox.text.buf, lastof(_file_to_saveload.name));
+ _file_to_saveload.name = FiosMakeSavegameName(this->filename_editbox.text.buf);
if (FioCheckFileExists(_file_to_saveload.name, Subdirectory::SAVE_DIR)) {
ShowQuery(STR_SAVELOAD_OVERWRITE_TITLE, STR_SAVELOAD_OVERWRITE_WARNING, this, SaveLoadWindow::SaveGameConfirmationCallback);
} else {
_switch_mode = SM_SAVE_GAME;
}
} else {
- FiosMakeHeightmapName(_file_to_saveload.name, this->filename_editbox.text.buf, lastof(_file_to_saveload.name));
+ _file_to_saveload.name = FiosMakeHeightmapName(this->filename_editbox.text.buf);
if (FioCheckFileExists(_file_to_saveload.name, Subdirectory::SAVE_DIR)) {
ShowQuery(STR_SAVELOAD_OVERWRITE_TITLE, STR_SAVELOAD_OVERWRITE_WARNING, this, SaveLoadWindow::SaveHeightmapConfirmationCallback);
} else {