This commit is contained in:
Anton Dolozin 2025-11-05 00:09:16 +01:00
parent db0919f6ba
commit f7558fb7bf

View File

@ -31,11 +31,11 @@ void add_target_capacity(struct station* station,const char* target, int capacit
struct car* ptr = *station->tracks; struct car* ptr = *station->tracks;
int count = 0; int count = 0;
int res = select_track(station, target); int res = select_track(station, target);
while(ptr && ptr->next){ while(ptr){
if(count == res){ if(count == res){
break; break;
} }
else if (strcmp(ptr->value, target) ==0 ){ if (strcmp(ptr->value, target) ==0 ){
ptr->capacity += capacity; ptr->capacity += capacity;
return; return;
} }