summaryrefslogtreecommitdiff
path: root/industry.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-12-09 14:14:51 +0000
committerrubidium <rubidium@openttd.org>2006-12-09 14:14:51 +0000
commit5b5b1d1514080cb4d1659507987681eede0a212b (patch)
treee0df6d79e90152d1b3508be213f07fe29b04698e /industry.h
parent38edab372b48c7fb5addcfab88ead01a6bb4a760 (diff)
downloadopenttd-5b5b1d1514080cb4d1659507987681eede0a212b.tar.xz
(svn r7451) -Fix (7372): GetNum(Towns|Industries) should return the actual number of towns and industries.
-Fix (6055): GetMax(Town|Industry)Index should not return the number of towns or industries - 1, but the size of the pool - 1.
Diffstat (limited to 'industry.h')
-rw-r--r--industry.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/industry.h b/industry.h
index 65da9bd0e..e0620f35b 100644
--- a/industry.h
+++ b/industry.h
@@ -99,7 +99,7 @@ static inline IndustryID GetMaxIndustryIndex(void)
* _really_ returns the highest index. Now it just returns
* the next safe value we are sure about everything is below.
*/
- return _total_industries - 1;
+ return GetIndustryPoolSize() - 1;
}
static inline uint GetNumIndustries(void)