This commit is contained in:
Maryna Kravtsova 2020-11-04 23:03:55 +01:00
parent 98ba737b3f
commit 4fae15c755

View File

@ -64,7 +64,7 @@ struct car* clear_train(struct car* first, const char* target) {
} }
struct car* this = first; struct car* this = first;
while(this->next != NULL){ while(this->next != NULL){
int x = strcmp(this->value, target); int x = strcmp(this->next->value, target);
if(x == 0){ if(x == 0){
struct car* prev = first; struct car* prev = first;
struct car* node = first->next; struct car* node = first->next;