Skip to content

Commit

Permalink
fix: Overadding for granaries
Browse files Browse the repository at this point in the history
  • Loading branch information
UberWaffe committed Jul 28, 2023
1 parent d9e2282 commit b7c9eb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/building/granary.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ int building_granaries_add_resource(int resource, int amount, int respect_settin
} else {
space_available = building_granary_maximum_receptible_amount(resource, b);
}
if (space_available > remaining_to_add) {
space_available = remaining_to_add;
}
if (space_available <= 0) {
continue;
}
Expand Down

0 comments on commit b7c9eb2

Please sign in to comment.