roadveh_gui.c
changeset 877 a0849f41e748
parent 867 581154a08a78
child 878 8f4f2ef6f674
--- a/roadveh_gui.c	Mon Jan 03 22:04:34 2005 +0000
+++ b/roadveh_gui.c	Mon Jan 03 22:07:40 2005 +0000
@@ -512,7 +512,9 @@
 	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);