Actions
Bug #1673
closedOverflow in culture victory calculation
Start date:
09/05/2025
Due date:
% Done:
0%
Estimated time:
Description
if (best != NULL && best_value >= game.info.culture_vic_points
&& best_value > second_value * (100 + game.info.culture_vic_lead) / 100) {
If second_value > 7158277, the first multiplication exceeds 2**31 and overflows.
The back story - I made the history_interest_pml value too big in my custom ruleset, forgetting about what happens with compound interest. Culture values this big would never happen with supplied rulesets, but this should still get fixed.
Files
Updated by Marko Lindqvist 3 months ago
- Category changed from General to Server
- Target version set to 3.1.6
Patch does not apply to main branch.
Updated by Dean Brown about 2 months ago
- File 1673Main.patch 1673Main.patch added
added patch for Main
Updated by Marko Lindqvist about 2 months ago
- Status changed from New to In Review
- Assignee set to Marko Lindqvist
Updated by Marko Lindqvist about 2 months ago
- Status changed from In Review to Closed
Updated by Marko Lindqvist about 1 month ago
- Status changed from Closed to In Review
Apply also to S2_6.
Actions