This commit is contained in:
Valér Jakubčo 2021-11-04 21:05:56 +01:00
parent e8dc186e9c
commit af3d09e2ef

View File

@ -74,5 +74,10 @@ struct car* clear_train(struct car* first, const char* target) {
this = this->next; this = this->next;
} }
} }
if(strcmp(this->next->value,target) == 0{
free(this->next);
this->next=NULL;
return this;
}
return first; return first;
} }