From 02059ab4a78889cd60b83fa032f7a4b1a4921a96 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 26 Nov 2013 13:27:34 +0000 Subject: [PATCH] (svn r26123) -Fix: make sure the maximum row length when making company buttons is at least 1 --- src/widget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widget.cpp b/src/widget.cpp index 6e73fd4491..4b215c346f 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;