This commit is contained in:
Valér Jakubčo 2021-11-04 20:56:24 +01:00
parent ab94fb17f3
commit e8dc186e9c

View File

@ -65,8 +65,9 @@ struct car* clear_train(struct car* first, const char* target) {
}
while( this->next->next != NULL){
if(strcmp(this->next->value, target) == 0){
struct car* third = this->next->next;
free(this->next);
this->next = this->next->next;
this->next = third;
return this;
}
else {