Aktualizovat du6/a_station.c
This commit is contained in:
parent
1d691c60c9
commit
00efac2dbf
@ -121,7 +121,7 @@ int count_capacity(struct station* station){
|
||||
for (int i = 0; i < station->track_count; i++)
|
||||
{
|
||||
struct car* currentTracks = station->tracks[i];
|
||||
while (currentTracks->next != NULL)
|
||||
while (currentTracks != NULL)
|
||||
{
|
||||
//skontroluje individualne ich int 'capacity' pole a inkrementuje do vysledneho poctu
|
||||
count += currentTracks->capacity;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user