Fixing the logic problem
This commit is contained in:
parent
b0c719ef34
commit
83a5f4b60c
@ -63,7 +63,7 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
}
|
||||
struct car* prev= NULL;
|
||||
struct car* temp = first;
|
||||
while (temp->next)
|
||||
while (temp)
|
||||
{
|
||||
if(strcmp(temp->value, target) == 0){
|
||||
struct car* targetNode = temp;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user