summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-01-20 20:18:19 +0000
committerrubidium <rubidium@openttd.org>2012-01-20 20:18:19 +0000
commit70c7fbd90eb0ace75d759725ba4d0085283f152c (patch)
treef807e537b9e78dff6442d4ec2a472217e84157d4 /src/network
parent15331fa03c5bd87c54ea51e57a9738e867f6bc2e (diff)
downloadopenttd-70c7fbd90eb0ace75d759725ba4d0085283f152c.tar.xz
(svn r23826) -Fix [FS#4972]: the detailed performance rating window showed the cargo count of the current quarter instead of the last quarter like the tooltip says
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_admin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_admin.cpp b/src/network/network_admin.cpp
index 592e26b3a..9fe7c4f77 100644
--- a/src/network/network_admin.cpp
+++ b/src/network/network_admin.cpp
@@ -412,13 +412,13 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyEconomy()
p->Send_uint64(company->money);
p->Send_uint64(company->current_loan);
p->Send_uint64(income);
- p->Send_uint16(company->cur_economy.delivered_cargo);
+ p->Send_uint16(min(UINT16_MAX, company->cur_economy.delivered_cargo.GetSum<OverflowSafeInt64>()));
/* Send stats for the last 2 quarters. */
for (uint i = 0; i < 2; i++) {
p->Send_uint64(company->old_economy[i].company_value);
p->Send_uint16(company->old_economy[i].performance_history);
- p->Send_uint16(company->old_economy[i].delivered_cargo);
+ p->Send_uint16(min(UINT16_MAX, company->old_economy[i].delivered_cargo.GetSum<OverflowSafeInt64>()));
}
this->SendPacket(p);