This commit is contained in:
Maryna Kravtsova 2020-11-04 21:59:24 +01:00
parent 4257bca064
commit 19b7e2077f

View File

@ -63,7 +63,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!= NULL){
int x = strcmp(prev->next->value, target); int x = strcmp(prev->next->value, target);
if(x == 0){ if(x == 0){
struct car* third = prev->next->next; struct car* third = prev->next->next;