# HG changeset patch # User stormcone <48624099+stormcone@users.noreply.github.com> # Date 2019-03-17 20:28:37 # Node ID b2ebc3136dd5ef3361674ac62d69c5808143377c # Parent bf0e9c0d63a374c2b34847dc53ff9a0ef7a12338 Fix f58fa80e: Wrong company performance rating when money exceeds INT_MAX. (#7382) Company performance rating calculation does not take into account the companies' money when those exceeds INT_MAX. diff --git a/src/economy.cpp b/src/economy.cpp --- a/src/economy.cpp +++ b/src/economy.cpp @@ -260,7 +260,7 @@ int UpdateCompanyRatingAndValue(Company /* Skip the total */ if (i == SCORE_TOTAL) continue; /* Check the score */ - s = Clamp(_score_part[owner][i], 0, _score_info[i].needed) * _score_info[i].score / _score_info[i].needed; + s = Clamp(_score_part[owner][i], 0, _score_info[i].needed) * _score_info[i].score / _score_info[i].needed; score += s; total_score += _score_info[i].score; }