Mercurial > hg > openttd
changeset 18295:cdd65f9bad88 draft
(svn r23131) -Fix (r16165): AIOrder::IsCurrentOrderPartOfOrderList return false for valid vehicles and crashed for invalid ones
author | yexo <yexo@openttd.org> |
---|---|
date | Tue, 08 Nov 2011 15:00:55 +0000 |
parents | 9c4b699d44bb |
children | 3f8406230feb |
files | src/ai/api/ai_order.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ai/api/ai_order.cpp +++ b/src/ai/api/ai_order.cpp @@ -128,7 +128,7 @@ /* static */ bool AIOrder::IsCurrentOrderPartOfOrderList(VehicleID vehicle_id) { - if (AIVehicle::IsValidVehicle(vehicle_id)) return false; + if (!AIVehicle::IsValidVehicle(vehicle_id)) return false; if (GetOrderCount(vehicle_id) == 0) return false; const Order *order = &::Vehicle::Get(vehicle_id)->current_order;