This commit is contained in:
Anton Dolozin 2025-11-04 23:56:24 +01:00
parent 7d0ceca38e
commit 90bc2f4090

View File

@ -56,7 +56,7 @@ void add_target_capacity(struct station* station,const char* target, int capacit
return;
}
}
else if (count == res && strcmp(ptr->value, target) == 0){
else if (count == res && strcmp(ptr->value, target) != 0){
struct car* next = (struct car*)calloc(1, sizeof(struct car));
strcpy(next->value, target);
next->capacity = capacity;