summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_mapgrd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/l_mapgrd.cc')
-rw-r--r--crawl-ref/source/l_mapgrd.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/l_mapgrd.cc b/crawl-ref/source/l_mapgrd.cc
index efefb583c5..f3098cfc23 100644
--- a/crawl-ref/source/l_mapgrd.cc
+++ b/crawl-ref/source/l_mapgrd.cc
@@ -40,12 +40,12 @@ static char* mapgrd_glyph(lua_State *ls, int &col, int &row)
col = mapc->col;
map_lines &lines = mapc->map->map;
- if (row < 1 || col < 1 || col > lines.width() || row > lines.height())
+ if (row < 0 || col < 0 || col >= lines.width() || row >= lines.height())
{
return (NULL);
}
- coord_def mc(col - 1, row - 1);
+ coord_def mc(col, row);
return (&lines(mc));
}