summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/train_gui.c b/train_gui.c
index 41335d1b5..b590eb29b 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -333,7 +333,9 @@ static void DrawTrainDepotWindow(Window *w)
SetHScrollCount(w, hnum);
/* 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);