Skip to content

Commit

Permalink
fixed crash in detect_bounty()
Browse files Browse the repository at this point in the history
  • Loading branch information
CBlueGH committed Jun 18, 2021
1 parent 857d14e commit ad16da9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/spells2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit ad16da9

Please sign in to comment.