diff options
author | yexo <yexo@openttd.org> | 2011-11-08 15:00:55 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2011-11-08 15:00:55 +0000 |
commit | dc1fd2dbe685cb15e53fea2bc5d21e196dc301e4 (patch) | |
tree | 5709553c139a441da3adeec62132c24528a6c4de /src/ai | |
parent | d5539f76d36281eab74cd7da47761324dbc34af6 (diff) | |
download | openttd-dc1fd2dbe685cb15e53fea2bc5d21e196dc301e4.tar.xz |
(svn r23131) -Fix (r16165): AIOrder::IsCurrentOrderPartOfOrderList return false for valid vehicles and crashed for invalid ones
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/api/ai_order.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_order.cpp b/src/ai/api/ai_order.cpp index f02932ac2..8757c7beb 100644 --- a/src/ai/api/ai_order.cpp +++ b/src/ai/api/ai_order.cpp @@ -128,7 +128,7 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or /* 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; |