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.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.cpp')
-rw-r--r-- | src/network/network.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index 6ee777648..05839042d 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -212,19 +212,19 @@ void CDECL NetworkTextMessage(NetworkAction action, ConsoleColour color, bool se SetDParamStr(0, name); SetDParamStr(1, buf); GetString(temp, self_send ? STR_NETWORK_CHAT_TO_COMPANY : STR_NETWORK_CHAT_COMPANY, lastof(temp)); - ttd_strlcpy(message, temp, sizeof(message)); + strecpy(message, temp, lastof(message)); break; case NETWORK_ACTION_CHAT_CLIENT: SetDParamStr(0, name); SetDParamStr(1, buf); GetString(temp, self_send ? STR_NETWORK_CHAT_TO_CLIENT : STR_NETWORK_CHAT_CLIENT, lastof(temp)); - ttd_strlcpy(message, temp, sizeof(message)); + strecpy(message, temp, lastof(message)); break; default: SetDParamStr(0, name); SetDParamStr(1, buf); GetString(temp, STR_NETWORK_CHAT_ALL, lastof(temp)); - ttd_strlcpy(message, temp, sizeof(message)); + strecpy(message, temp, lastof(message)); break; } @@ -734,9 +734,9 @@ void NetworkAddServer(const char *b) char host[NETWORK_HOSTNAME_LENGTH]; uint16 rport; - ttd_strlcpy(host, b, lengthof(host)); + strecpy(host, b, lastof(host)); - ttd_strlcpy(_settings_client.network.connect_to_ip, b, lengthof(_settings_client.network.connect_to_ip)); + strecpy(_settings_client.network.connect_to_ip, b, lastof(_settings_client.network.connect_to_ip)); rport = NETWORK_DEFAULT_PORT; ParseConnectionString(&company, &port, host); @@ -774,7 +774,7 @@ bool NetworkClientConnectGame(const char *host, uint16 port) if (port == 0) return false; - ttd_strlcpy(_settings_client.network.last_host, host, sizeof(_settings_client.network.last_host)); + strecpy(_settings_client.network.last_host, host, lastof(_settings_client.network.last_host)); _settings_client.network.last_port = port; NetworkDisconnect(); @@ -815,8 +815,8 @@ static void NetworkInitGameInfo() ci->client_index = NETWORK_SERVER_INDEX; ci->client_playas = _network_dedicated ? COMPANY_SPECTATOR : _local_company; - ttd_strlcpy(ci->client_name, _settings_client.network.client_name, sizeof(ci->client_name)); - ttd_strlcpy(ci->unique_id, _settings_client.network.network_id, sizeof(ci->unique_id)); + strecpy(ci->client_name, _settings_client.network.client_name, lastof(ci->client_name)); + strecpy(ci->unique_id, _settings_client.network.network_id, lastof(ci->unique_id)); } bool NetworkServerStart() |