(svn r1607) -Fix: When deleting an order, the next pointer was not cleared,
authortruelight
Sun, 23 Jan 2005 11:37:27 +0000
changeset 1106 a94c4856483e
parent 1105 b3003b14e45c
child 1107 29c55f462a18
(svn r1607) -Fix: When deleting an order, the next pointer was not cleared,
resulting in some unusual behavoir from time to time
order_cmd.c
--- a/order_cmd.c	Sun Jan 23 10:54:32 2005 +0000
+++ b/order_cmd.c	Sun Jan 23 11:37:27 2005 +0000
@@ -273,6 +273,7 @@
 
 		/* Give the item free */
 		order->type = OT_NOTHING;
+		order->next = NULL;
 
 		u = GetFirstVehicleFromSharedList(v);
 		while (u != NULL) {
@@ -568,6 +569,7 @@
 		}
 		/* End the list with an OT_NOTHING */
 		dest->type = OT_NOTHING;
+		dest->next = NULL;
 	}
 }
 
@@ -663,7 +665,7 @@
 		} else {
 			DEBUG(misc, 3) ("CheckOrder called in mode 1 (validation mode) for %d", v->index);
 		}*/
-		
+
 		FOR_VEHICLE_ORDERS(v, order) {
 			/* Dummy order? */
 			if (order->type == OT_DUMMY) {