summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 3dfe47890..836a0a8fd 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -34,9 +34,9 @@ TileExtended *_me = NULL; ///< Extended Tiles of the map
void AllocateMap(uint size_x, uint size_y)
{
/* Make sure that the map size is within the limits and that
- * the x axis size is a power of 2. */
- if (size_x < 64 || size_x > 2048 ||
- size_y < 64 || size_y > 2048 ||
+ * size of both axes is a power of 2. */
+ if (!IsInsideMM(size_x, MIN_MAP_SIZE, MAX_MAP_SIZE + 1) ||
+ !IsInsideMM(size_y, MIN_MAP_SIZE, MAX_MAP_SIZE + 1) ||
(size_x & (size_x - 1)) != 0 ||
(size_y & (size_y - 1)) != 0)
error("Invalid map size");