Fixing the link

This commit is contained in:
Anton Dolozin 2025-10-28 20:15:09 +01:00
parent 8e875b1b46
commit 2110f6c8a6

View File

@ -67,8 +67,8 @@ struct car* clear_train(struct car* first, const char* target) {
{if(strcmp(next->value, target) == 0){ {if(strcmp(next->value, target) == 0){
temp->next = next->next; temp->next = next->next;
next->next = NULL;
free(next); free(next);
next = temp->next;
} }
else{ else{