(svn r25892) -Fix: off-by-one error in GetVia prevented certain flows from getting picked

This commit is contained in:
fonsinchen
2013-10-20 14:27:36 +00:00
parent 54db96be43
commit 9337c561b0
2 changed files with 4 additions and 4 deletions

View File

@@ -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;