From: Pasi Kallinen Date: Thu, 3 Mar 2022 20:23:25 +0000 (+0200) Subject: Prevent monster hurtling outside map X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70795fa1242275351622872a5c61b4534ac4d639;p=nethack Prevent monster hurtling outside map --- diff --git a/src/dothrow.c b/src/dothrow.c index 3eb5374ac..7d56dfef4 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -910,6 +910,9 @@ mhurtle_step(genericptr_t arg, int x, int y) /* TODO: Treat walls, doors, iron bars, etc. specially * rather than just stopping before. */ + if (!isok(x, y)) + return FALSE; + if (goodpos(x, y, mon, MM_IGNOREWATER | MM_IGNORELAVA) && m_in_out_region(mon, x, y)) { int res;