(svn r1612) -Fix: made sure that ->next pointers are set to NULL
This commit is contained in:
		@@ -89,6 +89,7 @@ static Order *AllocateOrder(void)
 | 
				
			|||||||
			uint index = order->index;
 | 
								uint index = order->index;
 | 
				
			||||||
			memset(order, 0, sizeof(Order));
 | 
								memset(order, 0, sizeof(Order));
 | 
				
			||||||
			order->index = index;
 | 
								order->index = index;
 | 
				
			||||||
 | 
								order->next = NULL;
 | 
				
			||||||
			return order;
 | 
								return order;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -192,6 +192,8 @@ static Vehicle *InitializeVehicle(Vehicle *v)
 | 
				
			|||||||
	v->next = NULL;
 | 
						v->next = NULL;
 | 
				
			||||||
	v->next_hash = 0xffff;
 | 
						v->next_hash = 0xffff;
 | 
				
			||||||
	v->string_id = 0;
 | 
						v->string_id = 0;
 | 
				
			||||||
 | 
						v->next_shared = NULL;
 | 
				
			||||||
 | 
						v->prev_shared = NULL;
 | 
				
			||||||
	/* random_bits is used to pick out a random sprite for vehicles
 | 
						/* random_bits is used to pick out a random sprite for vehicles
 | 
				
			||||||
	    which are technical the same (newgrf stuff).
 | 
						    which are technical the same (newgrf stuff).
 | 
				
			||||||
	   Because RandomRange() results in desyncs, and because it does
 | 
						   Because RandomRange() results in desyncs, and because it does
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user