Aktualizovat du6/a_station.c

This commit is contained in:
Tomáš Vlček 2026-04-23 22:30:26 +00:00
parent 33e73030da
commit 09e936a1b7

View File

@ -19,7 +19,7 @@ void destroy_station(struct station* station)
//preiteruje cez kazdy jeden 'track/carar' v poli 'tracks' a //preiteruje cez kazdy jeden 'track/carar' v poli 'tracks' a
for (int i = 0; i < station->track_count; i++) for (int i = 0; i < station->track_count; i++)
{ {
struct car* currentTracks = station->tracks; struct car* currentTracks = station->tracks[i];
while (currentTracks->next != NULL) while (currentTracks->next != NULL)
{ {
struct car* tempTrack = currentTracks; struct car* tempTrack = currentTracks;