diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-17 13:52:16 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-17 13:52:16 -0800 |
commit | b9b8f3d1842acbf2d90fb097d0546172c67e3c73 (patch) | |
tree | 809b1a28973a3994a89f0c55affae97a07c77189 /crawl-ref/source/tilepick.cc | |
parent | 649129f7d0875fc715c6acd444726934696dbe45 (diff) | |
download | crawl-ref-b9b8f3d1842acbf2d90fb097d0546172c67e3c73.tar.gz crawl-ref-b9b8f3d1842acbf2d90fb097d0546172c67e3c73.zip |
Prevent assert in tile_draw_floor()
The assert might be caused by a bug somewhere else in the tiles code;
I'm not familiar enough with tiles to say.
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r-- | crawl-ref/source/tilepick.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 0e9de2c776..50c768cf67 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -4540,6 +4540,11 @@ void tile_draw_floor() { const coord_def ep(cx, cy); const coord_def gc = show2grid(ep); + + // XXX: This should probably be handled a better way. + if (!in_bounds(gc)) + continue; + int bg = TILE_DNGN_UNSEEN | tile_unseen_flag(gc); if (you.see_cell(gc)) |