diff --git a/cv5/a_train.c b/cv5/a_train.c index 39ef51b..0116f41 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -88,7 +88,7 @@ struct car* clear_train(struct car* first, const char* target) { if(first == this){ first = this->next; free(this); - this->next = NULL; + first->next = NULL; return first; } while(curr != this){