summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-31 06:46:53 +0000
committertron <tron@openttd.org>2005-01-31 06:46:53 +0000
commit77072aedabd1e5acd2d380defac707c88d287c88 (patch)
treec28ee29d470262a82c9af8f10c886ac66fc18b37
parent493ae95ce59ec96a02c8287b103b117791097c77 (diff)
downloadopenttd-77072aedabd1e5acd2d380defac707c88d287c88.tar.xz
(svn r1748) Enforce map size limits
-rw-r--r--map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/map.c b/map.c
index a7b24e57b..37f1e22dc 100644
--- a/map.c
+++ b/map.c
@@ -19,7 +19,8 @@ void InitMap(uint log_x, uint log_y)
{
uint map_size;
- assert(log_x <= 15 && log_y <= 15);
+ if (log_x < 6 || log_x > 11 || log_y < 6 || log_y > 11)
+ error("Invalid map size");
DEBUG(map, 1)("Allocating map of size %dx%d", log_x, log_y);