From 91662d4ed85c3c0aa06b94e9d7b297fb412a5f45 Mon Sep 17 00:00:00 2001 From: Kozar Date: Sun, 20 Oct 2024 13:02:50 +0000 Subject: [PATCH] Initializacia --- cv4/a_train.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index b175afa..5e87327 100644 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -48,7 +48,7 @@ struct car* clear_train(struct car* first, const char* target) { } struct car* current = first, new_first = first; if (first != NULL){ - if(strcmp(first->destination, target) == 0){ + if(strcmp(first->value, target) == 0){ new_first = new_first->next; free(first); first = new_first; @@ -57,7 +57,7 @@ struct car* clear_train(struct car* first, const char* target) { while (first->next != NULL) { current = first->next; - if (strcmp(current->destination, target) == 0) { + if (strcmp(current->value, target) == 0) { first->next = current->next; free(current); } else {