From bac7654a75a5ff6e5423afd7d5a5ea89a0bfcc3a Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 20 Apr 2015 18:09:59 +0300 Subject: [PATCH] Make sure can't chat out of the map --- src/sounds.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sounds.c b/src/sounds.c index f1dec986f..84883eab8 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1001,6 +1001,9 @@ dochat() } tx = u.ux+u.dx; ty = u.uy+u.dy; + + if (!isok(tx,ty)) return (0); + mtmp = m_at(tx, ty); if ((!mtmp || mtmp->mundetected) &&