summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_company.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp
index dd79feb88..8e19904f9 100644
--- a/src/script/api/script_company.cpp
+++ b/src/script/api/script_company.cpp
@@ -138,9 +138,9 @@
if (quarter > EARLIEST_QUARTER) return -1;
if (quarter == CURRENT_QUARTER) {
- return ::Company::Get((::CompanyID)company)->cur_economy.delivered_cargo;
+ return ::Company::Get((::CompanyID)company)->cur_economy.delivered_cargo.GetSum<OverflowSafeInt<int32, INT32_MAX, INT32_MIN> >();
}
- return ::Company::Get((::CompanyID)company)->old_economy[quarter - 1].delivered_cargo;
+ return ::Company::Get((::CompanyID)company)->old_economy[quarter - 1].delivered_cargo.GetSum<OverflowSafeInt<int32, INT32_MAX, INT32_MIN> >();
}
/* static */ int32 ScriptCompany::GetQuarterlyPerformanceRating(ScriptCompany::CompanyID company, uint32 quarter)