Aktualizovat du6/a_station.c

This commit is contained in:
Tomáš Vlček 2026-04-23 22:47:46 +00:00
parent 1d691c60c9
commit 00efac2dbf

View File

@ -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;