summaryrefslogtreecommitdiff
path: root/industry_gui.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-02 17:30:29 +0000
committertruelight <truelight@openttd.org>2005-02-02 17:30:29 +0000
commit83a889d6787dbb5899c8eec663634d36fb1c8108 (patch)
treef37dce29ebc098007022941531aab37cff480e31 /industry_gui.c
parentab3ed5c43121cc8adefc0c6bbcf9ef0d1203d3ff (diff)
downloadopenttd-83a889d6787dbb5899c8eec663634d36fb1c8108.tar.xz
(svn r1771) -Add: Industries are now dynamic (up to 64k industries). Generating
1kx1k maps should now be much faster, and give more than just oil-stuff ;)
Diffstat (limited to 'industry_gui.c')
-rw-r--r--industry_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/industry_gui.c b/industry_gui.c
index c8774286a..11854c501 100644
--- a/industry_gui.c
+++ b/industry_gui.c
@@ -493,7 +493,7 @@ static byte _industry_sort_order;
static int CDECL GeneralIndustrySorter(const void *a, const void *b)
{
char buf1[96];
- byte val;
+ uint16 val;
Industry *i = GetIndustry(*(const uint16*)a);
Industry *j = GetIndustry(*(const uint16*)b);
int r = 0;
@@ -557,7 +557,7 @@ static void MakeSortedIndustryList(void)
int n = 0;
/* Create array for sorting */
- _industry_sort = realloc(_industry_sort, _industries_size * sizeof(_industry_sort[0]));
+ _industry_sort = realloc(_industry_sort, GetIndustryPoolSize() * sizeof(_industry_sort[0]));
if (_industry_sort == NULL)
error("Could not allocate memory for the industry-sorting-list");