zase zatvorka

This commit is contained in:
Valér Jakubčo 2021-11-05 08:12:06 +01:00
parent 93c8452d85
commit 3972d51eff

View File

@ -55,10 +55,10 @@ struct car* clear_train(struct car* first, const char* target) {
if(strcmp(this->value, target) == 0){
//strcpy(this->value,this->next->value);
//this->next=NULL;
strucat car* tmp = this->next;
free(this);
this=this->next;
//free(this->next);
return this;
return tmp;
}else if(strcmp(this->next->value, target) == 0){
free(this->next);
this->next=NULL;