summaryrefslogtreecommitdiff
path: root/station_gui.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-03 17:22:35 +0000
committertruelight <truelight@openttd.org>2005-02-03 17:22:35 +0000
commit3eda5e61f7d078e64581afea2859062fb1622617 (patch)
treebe17b2ce20037210425d4757c66ffc50cccc6d77 /station_gui.c
parentaa299a8b6dc3510da51355e7765b3d202fd0ccac (diff)
downloadopenttd-3eda5e61f7d078e64581afea2859062fb1622617.tar.xz
(svn r1776) -Add: Dynamic stations. You can now have up to 64k of stations
Diffstat (limited to 'station_gui.c')
-rw-r--r--station_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/station_gui.c b/station_gui.c
index d7316d429..fe57f4dbe 100644
--- a/station_gui.c
+++ b/station_gui.c
@@ -84,7 +84,7 @@ static void GlobalSortStationList(void)
*i = 0;
/* Create array for sorting */
- _station_sort = realloc(_station_sort, _stations_size * sizeof(_station_sort[0]));
+ _station_sort = realloc(_station_sort, GetStationPoolSize() * sizeof(_station_sort[0]));
if (_station_sort == NULL)
error("Could not allocate memory for the station-sorting-list");
@@ -318,7 +318,7 @@ static void DrawStationViewWindow(Window *w)
byte *b;
- station_id = (byte)w->window_number;
+ station_id = (uint16)w->window_number;
st = GetStation(w->window_number);