(svn r26123) -Fix: make sure the maximum row length when making company buttons is at least 1

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
rubidium 11 years ago
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)
{
assert(max_length >= 1);
NWidgetVertical *vert = NULL; // Storage for all rows.
NWidgetHorizontal *hor = NULL; // Storage for buttons in one row.
int hor_length = 0;

Loading…
Cancel
Save