summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-06 11:47:47 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-06 11:47:47 +0000
commit5c6fa867a8a10aba4638e1d73114b24168cec327 (patch)
tree961123b7e37a076b39a08f08605ee70420812511 /crawl-ref/source/mapdef.cc
parent8595eb5695b02ca3449783c7cfe994828511a9bf (diff)
downloadcrawl-ref-5c6fa867a8a10aba4638e1d73114b24168cec327.tar.gz
crawl-ref-5c6fa867a8a10aba4638e1d73114b24168cec327.zip
Fixed off-by-one error when complaining about oversized maps (bobbens).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2340 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 5444119709..dd7f42e00b 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -1445,19 +1445,19 @@ std::string map_def::validate_map_def()
switch (orient)
{
case MAP_NORTH: case MAP_SOUTH:
- if (map.height() >= GYM * 2 / 3)
+ if (map.height() > GYM * 2 / 3)
return make_stringf("Map too large - height %d (max %d)",
map.height(), GYM * 2 / 3);
break;
case MAP_EAST: case MAP_WEST:
- if (map.width() >= GXM * 2 / 3)
+ if (map.width() > GXM * 2 / 3)
return make_stringf("Map too large - width %d (max %d)",
map.width(), GXM * 2 / 3);
break;
case MAP_NORTHEAST: case MAP_SOUTHEAST:
case MAP_NORTHWEST: case MAP_SOUTHWEST:
case MAP_FLOAT:
- if (map.width() >= GXM * 2 / 3 || map.height() > GYM * 2 / 3)
+ if (map.width() > GXM * 2 / 3 || map.height() > GYM * 2 / 3)
return make_stringf("Map too large - %dx%d (max %dx%d)",
map.width(), map.height(),
GXM * 2 / 3, GYM * 2 / 3);