From 415f8c559b5627c95cf738dae10719e67d198092 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 22 Dec 2023 22:43:58 -0500 Subject: [PATCH] static analyzer bit for monmove.c src/monmove.c(1820): warning: Reading invalid data from 'info'. --- src/monmove.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/monmove.c b/src/monmove.c index c9b5b8d45..253ff3f45 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -1817,6 +1817,7 @@ m_move(register struct monst *mtmp, int after) * mfndpos) has no effect for normal attacks, though it lets a * confused monster attack you by accident. */ + assert(chi >= 0 && chi < SIZE(info)); if (info[chi] & ALLOW_U) { nix = mtmp->mux; niy = mtmp->muy;