ad
This commit is contained in:
		
							parent
							
								
									ac45e2fca5
								
							
						
					
					
						commit
						71d268bb3b
					
				| @ -53,9 +53,11 @@ struct car* clear_train(struct car* first, const char* target) { | |||||||
| 	} | 	} | ||||||
| 	if(this->next->next == NULL){ | 	if(this->next->next == NULL){ | ||||||
| 		if(strcmp(this->value, target) == 0){ | 		if(strcmp(this->value, target) == 0){ | ||||||
| 			strcpy(this->value,this->next->value); | 			//strcpy(this->value,this->next->value);
 | ||||||
| 			this->next=NULL; | 			//this->next=NULL;
 | ||||||
| 			free(this->next); | 			free(this); | ||||||
|  | 			this=this->next | ||||||
|  | 			//free(this->next);
 | ||||||
| 			return this; | 			return this; | ||||||
| 		}else if(strcmp(this->next->value, target) == 0){ | 		}else if(strcmp(this->next->value, target) == 0){ | ||||||
| 			free(this->next); | 			free(this->next); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user