diff --git a/cv5/a_train.c b/cv5/a_train.c index c313084..c24a1aa 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -17,9 +17,10 @@ struct car* add_car(struct car* first,const char* target) { struct car* temp=first; int length=0; while(temp!=NULL){ - if(temp->next!=NULL) + if(temp->next!=NULL){ temp=temp->next; - length++; + } + length++; } strcpy(newcar->value, target);