From 5b5b1d1514080cb4d1659507987681eede0a212b Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 9 Dec 2006 14:14:51 +0000 Subject: (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. --- town.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'town.h') diff --git a/town.h b/town.h index 50a47c14b..edf6b38d0 100644 --- a/town.h +++ b/town.h @@ -171,7 +171,7 @@ static inline TownID GetMaxTownIndex(void) * _really_ returns the highest index. Now it just returns * the next safe value we are sure about everything is below. */ - return _total_towns - 1; + return GetTownPoolSize() - 1; } static inline uint GetNumTowns(void) -- cgit v1.2.3-54-g00ecf