summaryrefslogtreecommitdiff
path: root/oldloader.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-01 18:32:01 +0000
committertruelight <truelight@openttd.org>2005-02-01 18:32:01 +0000
commit59ac6e8c4b2e564a864260d6715d2128a291b1d0 (patch)
treeb7d40aab99c9bff1a5304e4659c8cc7748b8a881 /oldloader.c
parent567224e94089f26e0c64aa37c7c40937285fb8fa (diff)
downloadopenttd-59ac6e8c4b2e564a864260d6715d2128a291b1d0.tar.xz
(svn r1764) -Add: dynamic towns, you can now have up to 64k towns (let me know when
you have that amount of towns in a map ;))
Diffstat (limited to 'oldloader.c')
-rw-r--r--oldloader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/oldloader.c b/oldloader.c
index 4862c14a2..1b8bca9c2 100644
--- a/oldloader.c
+++ b/oldloader.c
@@ -595,6 +595,9 @@ static void FixTown(OldTown *o, int num, byte town_name_type)
if (o->xy == 0)
continue;
+ if (!AddBlockIfNeeded(&_town_pool, i))
+ error("Towns: failed loading savegame: too many towns");
+
t = GetTown(i);
t->xy = o->xy;