diff options
author | rubidium <rubidium@openttd.org> | 2013-11-26 13:27:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-26 13:27:34 +0000 |
commit | 02059ab4a78889cd60b83fa032f7a4b1a4921a96 (patch) | |
tree | 19047ba249e8634f59f4ea7480de4999ef359596 | |
parent | 79ccf48636c5290b453dccc9bfec660b9ba073ef (diff) | |
download | openttd-02059ab4a78889cd60b83fa032f7a4b1a4921a96.tar.xz |
(svn r26123) -Fix: make sure the maximum row length when making company buttons is at least 1
-rw-r--r-- | src/widget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index 6e73fd449..4b215c346 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -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; |