From 345d2a79e579c0a16f170a62ccd13f5b785c3fce Mon Sep 17 00:00:00 2001 From: Anton Dolozin Date: Wed, 5 Nov 2025 00:17:31 +0100 Subject: [PATCH] Get cap --- du5/a_station.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/du5/a_station.c b/du5/a_station.c index 2ba5b92..379e73f 100644 --- a/du5/a_station.c +++ b/du5/a_station.c @@ -77,6 +77,16 @@ void add_target_capacity(struct station* station,const char* target, int capacit } int get_target_capacity(struct station* station,const char* target){ + struct car* ptr = *station->tracks; + while (ptr) + { if(strcmp(ptr->value, target) == 0){ + return ptr->capacity; + + } + ptr = ptr->next; + + /* code */ + } return 0; }