mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r1607) -Fix: When deleting an order, the next pointer was not cleared,
resulting in some unusual behavoir from time to time
This commit is contained in:
parent
61a3ac68e2
commit
18f16908a2
@ -273,6 +273,7 @@ int32 CmdDeleteOrder(int x, int y, uint32 flags, uint32 vehicle_id, uint32 selec
|
|||||||
|
|
||||||
/* Give the item free */
|
/* Give the item free */
|
||||||
order->type = OT_NOTHING;
|
order->type = OT_NOTHING;
|
||||||
|
order->next = NULL;
|
||||||
|
|
||||||
u = GetFirstVehicleFromSharedList(v);
|
u = GetFirstVehicleFromSharedList(v);
|
||||||
while (u != NULL) {
|
while (u != NULL) {
|
||||||
@ -568,6 +569,7 @@ void BackupVehicleOrders(Vehicle *v, BackuppedOrders *bak)
|
|||||||
}
|
}
|
||||||
/* End the list with an OT_NOTHING */
|
/* End the list with an OT_NOTHING */
|
||||||
dest->type = OT_NOTHING;
|
dest->type = OT_NOTHING;
|
||||||
|
dest->next = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user