diff options
author | tron <tron@openttd.org> | 2005-01-31 06:46:53 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-31 06:46:53 +0000 |
commit | e1c19367f0cebbe90596319e9f82d959fa54621c (patch) | |
tree | c28ee29d470262a82c9af8f10c886ac66fc18b37 | |
parent | 4cc09527368aafe6e18f7e10899649818d01fd23 (diff) | |
download | openttd-e1c19367f0cebbe90596319e9f82d959fa54621c.tar.xz |
(svn r1748) Enforce map size limits
-rw-r--r-- | map.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |