1
0
Fork 0

(svn r26263) -Fix [FS#5865]: Don't run into infinite recursion when getting next stopping station

release/1.4
fonsinchen 2014-01-16 20:50:43 +00:00
parent e3947c8019
commit a5152be795
1 changed files with 4 additions and 4 deletions

View File

@ -428,10 +428,10 @@ StationIDStack OrderList::GetNextStoppingStation(const Vehicle *v, const Order *
hops);
const Order *advance = this->GetNextDecisionNode(
this->GetNext(next), hops);
if (advance == NULL) {
next = skip_to;
} else if (skip_to == NULL) {
next = advance;
if (advance == NULL || advance == first) {
next = (skip_to == first) ? NULL : skip_to;
} else if (skip_to == NULL || skip_to == first) {
next = (advance == first) ? NULL : advance;
} else {
StationIDStack st1 = this->GetNextStoppingStation(v, skip_to);
StationIDStack st2 = this->GetNextStoppingStation(v, advance);