diff options
author | elliptic <hyperelliptical@gmail.com> | 2014-04-04 11:13:21 -0400 |
---|---|---|
committer | elliptic <hyperelliptical@gmail.com> | 2014-04-04 11:13:21 -0400 |
commit | c5940bd0d39772da978965c350e6db007197f627 (patch) | |
tree | 1f15dfde6575d54d95eef044b4901603113d5907 /crawl-ref/source/directn.cc | |
parent | 79b3258f0283455e74a0a44017cf6c1f6eec73d8 (diff) | |
download | crawl-ref-c5940bd0d39772da978965c350e6db007197f627.tar.gz crawl-ref-c5940bd0d39772da978965c350e6db007197f627.zip |
Fix issues with xv-ing unknown squares.
This crashed if the unknown square was off the level boundary, and it gave an
empty description even if the unknown square was within the level boundary.
Now it just fails silently (which is appropriate given that v isn't listed
as an option in this case).
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 5af91c5e5c..5e23c9b161 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1861,6 +1861,8 @@ void direction_chooser::move_to_you() void direction_chooser::describe_target() { + if (!map_bounds(target()) || !env.map_knowledge(target()).known()) + return; full_describe_square(target()); need_all_redraw = true; } |