{"version":"2.1.280","anchor":"arithmetic-bug-fixed-in-a-budget-allocation-loop","canonical_anchor":"arithmetic-bug-fixed-in-a-budget-allocation-loop","heading":"Arithmetic bug fixed in a budget-allocation loop","tier":"internal","area":"Elsewhere","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280\/e\/arithmetic-bug-fixed-in-a-budget-allocation-loop","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280","markdown":"### Arithmetic bug fixed in a budget-allocation loop\n\nFixed a bug where a per-turn budget calculation updated the wrong variables\n\n**Unclear.** The finding doesn't say what user-facing feature or limit this budget allocation controls.\n\n**What**\n\nA piece of internal logic that figures out how much of a per-turn budget to allocate had a bug: after computing the amount to allocate (called `ee`, the smaller of the remaining budget `K[v] - O[v]` and a total `G`), the code was updating unrelated variables (`We[lo]` and `Wu`) instead of the running totals it was supposed to update (`O[v]` and `G`). This has been corrected so the running totals now actually reflect the computed amount.\n\n**Why**\n\nBecause the running totals weren't being updated correctly, this budget-tracking logic could drift from the real state over time. The fix makes the allocation math track correctly against what it's actually supposed to be limiting.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}