summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-01-23 13:30:02 +0000
committertruelight <truelight@openttd.org>2005-01-23 13:30:02 +0000
commitbb276ef5a9e93b3a043dc080b8135269fce14ca0 (patch)
treecef419291ca2e46b12addb2858f75232a2f21306
parent7d0468aaa4331946958e51549abd8cfcf94373f1 (diff)
downloadopenttd-bb276ef5a9e93b3a043dc080b8135269fce14ca0.tar.xz
(svn r1612) -Fix: made sure that ->next pointers are set to NULL
-rw-r--r--order_cmd.c1
-rw-r--r--vehicle.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/order_cmd.c b/order_cmd.c
index f1d4cce2d..b0e638cb5 100644
--- a/order_cmd.c
+++ b/order_cmd.c
@@ -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;
}
}
diff --git a/vehicle.c b/vehicle.c
index bc230838c..912357e7f 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -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