diff options
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r-- | src/order_gui.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 0645ecb68..8123013a4 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -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 */ |