summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-11-03 12:03:00 +0000
committersmatz <smatz@openttd.org>2008-11-03 12:03:00 +0000
commit7dd0b0dc07d4d5323ad229b064c5fd9e1fd44f61 (patch)
tree16127a8285818a7076c8ba1bf7d5edb72489c260 /src/network
parent808d9255a8e68fa34bdb51eccdd4db4a347268ed (diff)
downloadopenttd-7dd0b0dc07d4d5323ad229b064c5fd9e1fd44f61.tar.xz
(svn r14560) -Fix [FS#2396](r14555): lengthof() can't be simply replaced by lastof() in some cases (part by Aali)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_server.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 14d241243..3d69cbc02 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1372,7 +1372,7 @@ void NetworkPopulateCompanyInfo()
ci = NetworkFindClientInfoFromIndex(NETWORK_SERVER_INDEX);
// Register local company (if not dedicated)
if (ci != NULL && IsValidCompanyID(ci->client_playas))
- strecpy(_network_company_info[ci->client_playas].clients, ci->client_name, lastof(_network_company_info[0].clients));
+ strecpy(_network_company_info[ci->client_playas].clients, ci->client_name, lastof(_network_company_info[ci->client_playas].clients));
FOR_ALL_CLIENTS(cs) {
char client_name[NETWORK_CLIENT_NAME_LENGTH];
@@ -1382,10 +1382,10 @@ void NetworkPopulateCompanyInfo()
ci = DEREF_CLIENT_INFO(cs);
if (ci != NULL && IsValidCompanyID(ci->client_playas)) {
if (!StrEmpty(_network_company_info[ci->client_playas].clients)) {
- strecat(_network_company_info[ci->client_playas].clients, ", ", lastof(_network_company_info[0].clients));
+ strecat(_network_company_info[ci->client_playas].clients, ", ", lastof(_network_company_info[ci->client_playas].clients));
}
- strecat(_network_company_info[ci->client_playas].clients, client_name, lastof(_network_company_info[0].clients));
+ strecat(_network_company_info[ci->client_playas].clients, client_name, lastof(_network_company_info[ci->client_playas].clients));
}
}
}