From 4257bca06466c908700d1df720fa848b27df5323 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Wed, 4 Nov 2020 13:13:58 +0100 Subject: [PATCH] clear --- cv5/a_train.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index 2e52925..c50cd62 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -69,7 +69,7 @@ struct car* clear_train(struct car* first, const char* target) { struct car* third = prev->next->next; free(prev->next); prev->next = third; - first->next = NULL; + prev->next->next = NULL; return first; } prev = prev->next;