Skip to content

Commit

Permalink
Fix the treasury off by one error
Browse files Browse the repository at this point in the history
  • Loading branch information
jt-traub committed Sep 21, 2024
1 parent 10734fd commit 6d4a211
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2186,18 +2186,17 @@ void Game::WriteTimesArticle(AString article)

void Game::CountItems(size_t ** citems)
{
int i = 0;
forlist (&factions)
{
Faction * fac = (Faction *) elem;
if (!fac->is_npc)
{
int i = fac->num - 1; // faction numbers are 1-based
for (int j = 0; j < NITEMS; j++)
{
citems[i][j] = CountItem (fac, j);
}
}
i++;
}
}

Expand Down

0 comments on commit 6d4a211

Please sign in to comment.