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

This commit is contained in:
rubidium 2013-11-26 13:27:34 +00:00
parent 79ccf48636
commit 02059ab4a7

View File

@ -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;