diff --git a/cv6/a_station.c b/cv6/a_station.c index 758e5d2..5bf46ae 100644 --- a/cv6/a_station.c +++ b/cv6/a_station.c @@ -81,12 +81,12 @@ int count_targets(struct station* station){ } int count_capacity(struct station* station){ - int counter=1; + int counter=0; for(int i=0;itrack_count;i++){ struct car* newCar= station->tracks[i]; while (newCar->value!=NULL) { - counter+=1; + counter+=newCar->capacity; newCar=newCar->next; } }