diff --git a/cv4/a_train.c b/cv4/a_train.c index 0961887..a4c58e5 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -75,7 +75,7 @@ struct car* clear_train(struct car* first, const char* target) { } if(strcmp(this->next->value, target) == 0){ free(this->next); - this->next=NULL; + this->next=this->next->next; return this; }else if(strcmp(this->next->next->value, target) == 0){ free(this->next->next);