(svn r26057) -Fix: a number of possibly uninitialised variables

This commit is contained in:
rubidium
2013-11-23 13:12:19 +00:00
parent 2e54c8fdfa
commit b3e93d6520
13 changed files with 28 additions and 13 deletions

View File

@@ -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 */