summaryrefslogtreecommitdiff
path: root/src/station_base.h
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-10-20 14:27:36 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-10-20 14:27:36 +0000
commit9337c561b0cc37a9156d4132178d54322cf6d06e (patch)
treef86b661e6ad266bd1c8a687ff0eb193b82d46896 /src/station_base.h
parent54db96be43bbb94f3d5193647be2f787a192f358 (diff)
downloadopenttd-9337c561b0cc37a9156d4132178d54322cf6d06e.tar.xz
(svn r25892) -Fix: off-by-one error in GetVia prevented certain flows from getting picked
Diffstat (limited to 'src/station_base.h')
-rw-r--r--src/station_base.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_base.h b/src/station_base.h
index 280df69d7..d2266be9c 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -96,7 +96,7 @@ public:
inline StationID GetVia() const
{
assert(!this->shares.empty());
- return this->shares.upper_bound(RandomRange((--this->shares.end())->first - 1))->second;
+ return this->shares.upper_bound(RandomRange((--this->shares.end())->first))->second;
}
StationID GetVia(StationID excluded, StationID excluded2 = INVALID_STATION) const;