diff --git a/du4/a_train.c b/du4/a_train.c index 37e95fd..37f66b5 100644 --- a/du4/a_train.c +++ b/du4/a_train.c @@ -52,6 +52,9 @@ struct car* clear_train(struct car* first, const char* target) { } else if(first->next == NULL && strcmp(first->value, target) != 0){ return first; + } + if(first->next->next == NULL && strcmp(first->value, target) == 0){ + } struct car* temp = first; struct car* next = first->next; @@ -69,6 +72,6 @@ struct car* clear_train(struct car* first, const char* target) { } - return first; + return temp; }