summaryrefslogtreecommitdiff
path: root/roadveh_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'roadveh_gui.c')
-rw-r--r--roadveh_gui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c
index 23c4758f1..06737a501 100644
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -512,7 +512,9 @@ static void DrawRoadDepotWindow(Window *w)
SetVScrollCount(w, (num + w->hscroll.cap - 1) / w->hscroll.cap);
/* locate the depot struct */
- for(d=_depots; d->xy != (TileIndex)tile; d++) {}
+ for (d = _depots; d->xy != (TileIndex)tile; d++) {
+ assert(d < endof(_depots);
+ }
SetDParam(0, d->town_index);
DrawWindowWidgets(w);