(svn r1612) -Fix: made sure that ->next pointers are set to NULL

This commit is contained in:
truelight 2005-01-23 13:30:02 +00:00
parent 7d0468aaa4
commit bb276ef5a9
2 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,7 @@ static Order *AllocateOrder(void)
uint index = order->index;
memset(order, 0, sizeof(Order));
order->index = index;
order->next = NULL;
return order;
}
}

View File

@ -192,6 +192,8 @@ static Vehicle *InitializeVehicle(Vehicle *v)
v->next = NULL;
v->next_hash = 0xffff;
v->string_id = 0;
v->next_shared = NULL;
v->prev_shared = NULL;
/* random_bits is used to pick out a random sprite for vehicles
which are technical the same (newgrf stuff).
Because RandomRange() results in desyncs, and because it does