clear train
This commit is contained in:
parent
cd80b555fd
commit
058b79b3c8
@ -52,9 +52,9 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
}
|
||||
}
|
||||
while( this->next->next != NULL){
|
||||
if(strcmp(this->value, target) == 0){
|
||||
if(strcmp(this->next->value, target) == 0){
|
||||
this->next == this->next->next;
|
||||
free(this);
|
||||
free(this->next);
|
||||
return first;
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user