summaryrefslogtreecommitdiff
path: root/depot_gui.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-09-27 15:28:47 +0000
committerbjarni <bjarni@openttd.org>2006-09-27 15:28:47 +0000
commitd67f0cf3ec31baac73e22ea78bfa611fde3b78f7 (patch)
tree73442ca0201c19cd9b19612fd02b48999639c67e /depot_gui.c
parentcda35f1355c4e4dfe382b1cabf0653e35025300f (diff)
downloadopenttd-d67f0cf3ec31baac73e22ea78bfa611fde3b78f7.tar.xz
(svn r6528) -Fix r6527: fixed an off by one error in an assert
Diffstat (limited to 'depot_gui.c')
-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) {