train
This commit is contained in:
parent
ae83e17915
commit
e0e3d11bf2
@ -36,9 +36,8 @@ void cancel_train(struct car* first) {
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
if(first->next == NULL){
|
if(first->next == NULL){
|
||||||
struct car* this;
|
struct car* this = first;
|
||||||
this = first;
|
first = first->next;
|
||||||
first = this->next;
|
|
||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
cancel_train(first->next);
|
cancel_train(first->next);
|
||||||
|
Loading…
Reference in New Issue
Block a user