summaryrefslogtreecommitdiff
path: root/src/fios_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-14 22:50:21 +0000
committerfrosch <frosch@openttd.org>2012-11-14 22:50:21 +0000
commit6653ac6b362cf88a6b77a4e8dd3c6926885c6b5f (patch)
tree390b2ccf0ad8f69cd6682320ebdbcbdda0ae31ce /src/fios_gui.cpp
parentf6d4200f86e93828a4a58a957d6ae7d9d5497a86 (diff)
downloadopenttd-6653ac6b362cf88a6b77a4e8dd3c6926885c6b5f.tar.xz
(svn r24739) -Codechange: Simplify some code by using Textbuf::Assign.
Diffstat (limited to 'src/fios_gui.cpp')
-rw-r--r--src/fios_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 6eac9315e..1a8b49935 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -567,8 +567,7 @@ public:
}
if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO || _saveload_mode == SLD_SAVE_HEIGHTMAP) {
/* Copy clicked name to editbox */
- ttd_strlcpy(this->text.buf, file->title, this->text.max_bytes);
- this->text.UpdateSize();
+ this->text.Assign(file->title);
this->SetWidgetDirty(WID_SL_SAVE_OSK_TITLE);
}
} else if (!_load_check_data.HasErrors()) {