diff options
author | tron <tron@openttd.org> | 2005-01-03 22:07:40 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-03 22:07:40 +0000 |
commit | 2f2688b829cc61a453f668a3fa388489ad043528 (patch) | |
tree | f79b543714e7dc1d8c4d3ce99194c94edb45f994 /roadveh_gui.c | |
parent | 579d51b1b2b0fbaba21f0193576d79498ee0cc70 (diff) | |
download | openttd-2f2688b829cc61a453f668a3fa388489ad043528.tar.xz |
(svn r1358) Assert bounds of depot list when searching for a depot
Diffstat (limited to 'roadveh_gui.c')
-rw-r--r-- | roadveh_gui.c | 4 |
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); |