(svn r22236) -Fix (r21457): Disarm a bear-pit, which r22226 almost fell into.
This commit is contained in:
		| @@ -807,8 +807,8 @@ public: | |||||||
|  |  | ||||||
| 	virtual void OnInvalidateData(int data) | 	virtual void OnInvalidateData(int data) | ||||||
| 	{ | 	{ | ||||||
| 		VehicleOrderID from = GB(data, 0, 8); | 		VehicleOrderID from = INVALID_VEH_ORDER_ID; | ||||||
| 		VehicleOrderID to   = GB(data, 8, 8); | 		VehicleOrderID to   = INVALID_VEH_ORDER_ID; | ||||||
|  |  | ||||||
| 		switch (data) { | 		switch (data) { | ||||||
| 			case -666: | 			case -666: | ||||||
| @@ -831,6 +831,9 @@ public: | |||||||
| 				break; | 				break; | ||||||
|  |  | ||||||
| 			default: | 			default: | ||||||
|  | 				if (data < 0) break; | ||||||
|  | 				from = GB(data, 0, 8); | ||||||
|  | 				to   = GB(data, 8, 8); | ||||||
| 				/* Moving an order. If one of these is INVALID_VEH_ORDER_ID, then | 				/* Moving an order. If one of these is INVALID_VEH_ORDER_ID, then | ||||||
| 				 * the order is being created / removed */ | 				 * the order is being created / removed */ | ||||||
| 				if (this->selected_order == -1) break; | 				if (this->selected_order == -1) break; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 frosch
					frosch