summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--depot_gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/depot_gui.c b/depot_gui.c
index 951141d27..d83e9119e 100644
--- a/depot_gui.c
+++ b/depot_gui.c
@@ -740,7 +740,7 @@ void ShowDepotWindow(TileIndex tile, byte type)
Window *w;
/* First we ensure that the widget counts are equal in all 3 lists to prevent bad stuff from happening */
- assert(lengthof(widget_moves) == lengthof(_depot_widgets));
+ assert(lengthof(widget_moves) == lengthof(_depot_widgets) - 1); // we should not count WIDGETS_END
assert(lengthof(widget_moves) == DEPOT_WIDGET_LAST);
switch (type) {