diff --git a/cv5/a_train.c b/cv5/a_train.c index b512cd9..c9e1142 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -16,7 +16,7 @@ struct car* add_car(struct car* first,const char* target) { struct car* newcar = calloc(1,sizeof(struct car)); struct car* this=first; strcpy(newcar->value, target); - if(this==NULL){ + if(first==NULL){ return newcar; } while(this->next!=NULL){