diff options
author | rubidium <rubidium@openttd.org> | 2009-08-31 22:18:17 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-08-31 22:18:17 +0000 |
commit | 5cc6d1f894f224b3fdde6cdb5535ce4154172f09 (patch) | |
tree | 053560341428bb8d074d2f0bacb3a64be1294166 | |
parent | 13d41d43b1d6bee6f3bceecd6cb07c44efbeac9c (diff) | |
download | openttd-5cc6d1f894f224b3fdde6cdb5535ce4154172f09.tar.xz |
(svn r17335) -Fix (r17333): don't return a pointer as boolean
-rw-r--r-- | src/yapf/yapf_road.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/yapf/yapf_road.cpp b/src/yapf/yapf_road.cpp index 2fe1e2374..9bc39c3bf 100644 --- a/src/yapf/yapf_road.cpp +++ b/src/yapf/yapf_road.cpp @@ -488,7 +488,8 @@ bool YapfFindNearestRoadDepot(const Vehicle *v, int max_distance, TileIndex *dep /* handle the case when our vehicle is already in the depot tile */ if (IsRoadDepotTile(tile)) { /* only what we need to return is the Depot* */ - return Depot::GetByTile(tile); + *depot_tile = tile; + return true; } /* default is YAPF type 2 */ |