diff options
author | skidd13 <skidd13@openttd.org> | 2008-11-02 11:20:15 +0000 |
---|---|---|
committer | skidd13 <skidd13@openttd.org> | 2008-11-02 11:20:15 +0000 |
commit | 9b282b3e51864af68b752831f68d719e9926c206 (patch) | |
tree | 852231dcb9853107b3876ca33a89cbeb47f20133 /src/network/network_gui.cpp | |
parent | 44a774a2775bfdbf270eac3adcd778e1ae4cba93 (diff) | |
download | openttd-9b282b3e51864af68b752831f68d719e9926c206.tar.xz |
(svn r14555) -Codechange: replace ttd_strlcat and ttd_strlcpy with strecat and strecpy where direct conversion is possible
Diffstat (limited to 'src/network/network_gui.cpp')
-rw-r--r-- | src/network/network_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index cc23c6eeb..fefdde532 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -672,9 +672,9 @@ public: /* The name is only allowed when it starts with a letter! */ if (!StrEmpty(this->edit_str_buf) && this->edit_str_buf[0] != ' ') { - ttd_strlcpy(_settings_client.network.client_name, this->edit_str_buf, lengthof(_settings_client.network.client_name)); + strecpy(_settings_client.network.client_name, this->edit_str_buf, lastof(_settings_client.network.client_name)); } else { - ttd_strlcpy(_settings_client.network.client_name, "Player", lengthof(_settings_client.network.client_name)); + strecpy(_settings_client.network.client_name, "Player", lastof(_settings_client.network.client_name)); } return state; } @@ -1003,8 +1003,8 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow { if (name != NULL) { SetFiosType(this->map->type); _file_to_saveload.filetype = FT_SCENARIO; - ttd_strlcpy(_file_to_saveload.name, name, sizeof(_file_to_saveload.name)); - ttd_strlcpy(_file_to_saveload.title, this->map->title, sizeof(_file_to_saveload.title)); + strecpy(_file_to_saveload.name, name, lastof(_file_to_saveload.name)); + strecpy(_file_to_saveload.title, this->map->title, lastof(_file_to_saveload.title)); delete this; SwitchMode(SM_START_SCENARIO); @@ -1049,7 +1049,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow { if (this->field == NSSW_GAMENAME) { if (this->HandleEditBoxKey(NSSW_GAMENAME, key, keycode, state) == HEBR_CONFIRM) return state; - ttd_strlcpy(_settings_client.network.server_name, this->text.buf, sizeof(_settings_client.network.server_name)); + strecpy(_settings_client.network.server_name, this->text.buf, lastof(_settings_client.network.server_name)); } return state; @@ -1060,7 +1060,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow { if (str == NULL) return; if (this->widget_id == NSSW_SETPWD) { - ttd_strlcpy(_settings_client.network.server_password, str, lengthof(_settings_client.network.server_password)); + strecpy(_settings_client.network.server_password, str, lastof(_settings_client.network.server_password)); } else { int32 value = atoi(str); this->InvalidateWidget(this->widget_id); |