This commit is contained in:
Maryna Kravtsova 2020-11-05 15:27:14 +01:00
parent a07d0dd1df
commit 0368a7af28

View File

@ -64,7 +64,7 @@ struct car* clear_train(struct car* first, const char* target) {
} }
struct car* prev = first; struct car* prev = first;
while(prev->next->next != NULL){ while(prev->next->next != NULL){
int x = strcmp(prev->value, target); int x = strcmp(first->value, target);
if(x == 0){ if(x == 0){
first = NULL; first = NULL;
first = prev->next; first = prev->next;