Changeset - r27346:449401a2734d
[Not reviewed]
master
0 1 0
PeterN - 19 months ago 2023-05-14 12:04:59
peter1138@openttd.org
Fix #10823, Fix #10811: Order list has end marker row. (#10825)
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/order_gui.cpp
Show inline comments
 
@@ -562,7 +562,8 @@ private:
 
	{
 
		int sel = this->vscroll->GetScrolledRowFromWidget(y, this, WID_O_ORDER_LIST, WidgetDimensions::scaled.framerect.top);
 
		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;
 
	}
 

	
0 comments (0 inline, 0 general)