mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-15 16:45:08 +01:00
(svn r26123) -Fix: make sure the maximum row length when making company buttons is at least 1
This commit is contained in:
parent
79ccf48636
commit
02059ab4a7
@ -2835,6 +2835,7 @@ NWidgetContainer *MakeWindowNWidgetTree(const NWidgetPart *parts, int count, int
|
|||||||
*/
|
*/
|
||||||
NWidgetBase *MakeCompanyButtonRows(int *biggest_index, int widget_first, int widget_last, int max_length, StringID button_tooltip)
|
NWidgetBase *MakeCompanyButtonRows(int *biggest_index, int widget_first, int widget_last, int max_length, StringID button_tooltip)
|
||||||
{
|
{
|
||||||
|
assert(max_length >= 1);
|
||||||
NWidgetVertical *vert = NULL; // Storage for all rows.
|
NWidgetVertical *vert = NULL; // Storage for all rows.
|
||||||
NWidgetHorizontal *hor = NULL; // Storage for buttons in one row.
|
NWidgetHorizontal *hor = NULL; // Storage for buttons in one row.
|
||||||
int hor_length = 0;
|
int hor_length = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user