(svn r26057) -Fix: a number of possibly uninitialised variables
This commit is contained in:
@@ -349,8 +349,10 @@ void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int
|
||||
|
||||
static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
|
||||
{
|
||||
Order order;
|
||||
order.next = NULL;
|
||||
/* Hack-ish; unpack order 0, so everything gets initialised with either zero
|
||||
* or a suitable default value for the variable. Then also override the index
|
||||
* as it is not coming from a pool, so would be initialised. */
|
||||
Order order(0);
|
||||
order.index = 0;
|
||||
|
||||
/* check depot first */
|
||||
|
Reference in New Issue
Block a user