This commit is contained in:
Valér Jakubčo 2021-11-04 20:53:49 +01:00
parent 560f813276
commit ab94fb17f3

View File

@ -64,7 +64,7 @@ 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){
free(this->next);
this->next = this->next->next;
return this;