|
From: <gi...@cr...> - 2017-06-17 18:25:11
|
via 32e1473728e8ef2d9a8c58ed1af75db6c77d5577 (commit)
from 3fa40af13f904aec611813e7339343ceead2ae76 (commit)
-----------------------------------------------------------------------
commit 32e1473728e8ef2d9a8c58ed1af75db6c77d5577
Author: advil <ra...@gm...>
Date: Sat Jun 17 14:24:01 2017 -0400
Add a bounds check
oops
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/travel.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index bf7370b..aa7abdf 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -2792,7 +2792,8 @@ static bool _find_transtravel_square(const level_pos &target, bool verbose)
// TODO: actually check this when the square is off-level? The current
// behavior is that it will go to the level and then fail.
const bool maybe_traversable = (target.id != current
- || feat_is_traversable_now(env.map_knowledge(target.pos).feat()));
+ || (in_bounds(target.pos)
+ && feat_is_traversable_now(env.map_knowledge(target.pos).feat())));
if (maybe_traversable)
{
--
Dungeon Crawl Stone Soup
|