(svn r1607) -Fix: When deleting an order, the next pointer was not cleared,

resulting in some unusual behavoir from time to time
replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
truelight 20 years ago
parent 9f60324821
commit 8fe9bc6439

@ -273,6 +273,7 @@ int32 CmdDeleteOrder(int x, int y, uint32 flags, uint32 vehicle_id, uint32 selec
/* Give the item free */
order->type = OT_NOTHING;
order->next = NULL;
u = GetFirstVehicleFromSharedList(v);
while (u != NULL) {
@ -568,6 +569,7 @@ void BackupVehicleOrders(Vehicle *v, BackuppedOrders *bak)
}
/* End the list with an OT_NOTHING */
dest->type = OT_NOTHING;
dest->next = NULL;
}
}

Loading…
Cancel
Save