forked from mirror/OpenTTD
@@ -562,7 +562,8 @@ private:
|
|||||||
{
|
{
|
||||||
int sel = this->vscroll->GetScrolledRowFromWidget(y, this, WID_O_ORDER_LIST, WidgetDimensions::scaled.framerect.top);
|
int sel = this->vscroll->GetScrolledRowFromWidget(y, this, WID_O_ORDER_LIST, WidgetDimensions::scaled.framerect.top);
|
||||||
if (sel == INT_MAX) return INVALID_VEH_ORDER_ID;
|
if (sel == INT_MAX) return INVALID_VEH_ORDER_ID;
|
||||||
assert(IsInsideBS(sel, 0, vehicle->GetNumOrders()));
|
/* One past the orders is the 'End of Orders' line. */
|
||||||
|
assert(IsInsideBS(sel, 0, vehicle->GetNumOrders() + 1));
|
||||||
return sel;
|
return sel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user