diff options
-rw-r--r-- | crawl-ref/source/acr.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index bb8bd1ba16..4ebfd170cc 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -3918,6 +3918,11 @@ static void _move_player(coord_def move) } const coord_def& targ = you.pos() + move; + + // You can't walk out of bounds! + if (!in_bounds(targ)) + return; + const dungeon_feature_type targ_grid = grd(targ); monsters* targ_monst = monster_at(targ); |