From ad16da965e7dd4476b5e9849b8bda3fff38703b9 Mon Sep 17 00:00:00 2001 From: "C. Blue" Date: Fri, 18 Jun 2021 06:52:56 +0200 Subject: [PATCH] fixed crash in detect_bounty() --- src/server/spells2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/spells2.c b/src/server/spells2.c index f25d9f069..5ae4eed50 100644 --- a/src/server/spells2.c +++ b/src/server/spells2.c @@ -2920,7 +2920,7 @@ bool detect_bounty(int Ind, int rad) { if (kit_o_ptr->owner == Players[p]->id) break; } - if (p != NumPlayers && !cs_ptr->sc.montrap.found && check_hostile(Ind, p)) { + if (p != NumPlayers + 1 && !cs_ptr->sc.montrap.found && check_hostile(Ind, p)) { if (magik(chance)) { cs_ptr->sc.montrap.found = TRUE; note_spot_depth(wpos, i, j); @@ -2945,7 +2945,7 @@ bool detect_bounty(int Ind, int rad) { if (cs_ptr->sc.rune.id == Players[p]->id) break; } - if (p != NumPlayers && !cs_ptr->sc.rune.found && check_hostile(Ind, p)) { + if (p != NumPlayers + 1 && !cs_ptr->sc.rune.found && check_hostile(Ind, p)) { if (magik(chance)) { cs_ptr->sc.rune.found = TRUE; note_spot_depth(wpos, i, j);