summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-04 13:23:29 +0000
committertruelight <truelight@openttd.org>2005-02-04 13:23:29 +0000
commit42f98c7eec8cd46ea8452911fb4381f209de342f (patch)
tree512961ac36580ababc52512c67235f48f4bef8c8 /vehicle_gui.c
parent88ebe22d8b6e844b501688673f71db3505ea2b57 (diff)
downloadopenttd-42f98c7eec8cd46ea8452911fb4381f209de342f.tar.xz
(svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles)
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r--vehicle_gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 830a6bb46..62d720061 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -79,7 +79,7 @@ void BuildVehicleList(vehiclelist_d *vl, int type, int owner, int station)
if (!(vl->flags & VL_REBUILD)) return;
/* Create array for sorting */
- _vehicle_sort = realloc(_vehicle_sort, _vehicles_size * sizeof(_vehicle_sort[0]));
+ _vehicle_sort = realloc(_vehicle_sort, GetVehiclePoolSize() * sizeof(_vehicle_sort[0]));
if (_vehicle_sort == NULL)
error("Could not allocate memory for the vehicle-sorting-list");