diff --git a/du5/a_station.c b/du5/a_station.c index 0b12508..4f0a7b1 100644 --- a/du5/a_station.c +++ b/du5/a_station.c @@ -52,7 +52,8 @@ void add_target_capacity(struct station* station,const char* target, int capacit return; } } - ptr->capacity += capacity; + int new_cap = ptr->capacity + capacity; + ptr->capacity = new_cap; return;