This commit is contained in:
Valér Jakubčo 2021-11-04 20:49:57 +01:00
parent 0510e66518
commit 7aaca319e2

View File

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