mirror of https://github.com/OpenTTD/OpenTTD
(svn r26744) -Fix [FS6085-ish]: ScriptListSorterItemDescending::FindNext failed to detect the end.
parent
a03ad12322
commit
7ca57bc578
|
@ -362,7 +362,12 @@ public:
|
|||
this->has_no_more_items = true;
|
||||
return;
|
||||
}
|
||||
this->item_iter--;
|
||||
if (this->item_iter == this->list->items.begin()) {
|
||||
/* Use 'end' as marker for 'beyond begin' */
|
||||
this->item_iter = this->list->items.end();
|
||||
} else {
|
||||
this->item_iter--;
|
||||
}
|
||||
if (this->item_iter != this->list->items.end()) item_next = (*this->item_iter).first;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue