From 5c6fa867a8a10aba4638e1d73114b24168cec327 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sat, 6 Oct 2007 11:47:47 +0000 Subject: 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 --- crawl-ref/source/mapdef.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/mapdef.cc') 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); -- cgit v1.2.3-54-g00ecf