forked from mirror/OpenTTD
(svn r1358) Assert bounds of depot list when searching for a depot
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user