This commit is contained in:
Maryna Kravtsova 2020-11-05 16:05:45 +01:00
parent 02f66e152a
commit 292d002348

View File

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