Skip to content

Commit

Permalink
wall monsters: fix segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
chucksellick committed Feb 23, 2025
1 parent 7e2b5b7 commit a2c68ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions crawl-ref/source/mapmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ bool map_terrain_change_marker::any_at(coord_def pos, function<bool(map_terrain_
if (predicate(*terrain_marker))
return true;
}
return false;
};

////////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 3 additions & 2 deletions crawl-ref/source/mon-place.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ static bool _habitable_grid(const coord_def& pos)
return true;

// Veto protective walls created by deities
auto no_tombs = [](map_terrain_change_marker terrain) {
return terrain.change_type == TERRAIN_CHANGE_IMPRISON || terrain.change_type == TERRAIN_CHANGE_TOMB;
auto no_tombs = [](map_terrain_change_marker& terrain) {
return terrain.change_type == TERRAIN_CHANGE_IMPRISON
|| terrain.change_type == TERRAIN_CHANGE_TOMB;
};
if (map_terrain_change_marker::any_at(pos, no_tombs))
return false;
Expand Down

0 comments on commit a2c68ec

Please sign in to comment.