diff options
Diffstat (limited to 'crawl-ref/source/ghost.cc')
-rw-r--r-- | crawl-ref/source/ghost.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc index 69014f76d6..55ae7ffc26 100644 --- a/crawl-ref/source/ghost.cc +++ b/crawl-ref/source/ghost.cc @@ -850,7 +850,7 @@ void ghost_demon::announce_ghost(const ghost_demon &g) void ghost_demon::find_extra_ghosts( std::vector<ghost_demon> &gs, int n ) { - for (monster_iterator mi; mi; ++mi) + for (monster_iterator mi; mi && n > 0; ++mi) { if (mi->type == MONS_PLAYER_GHOST && mi->ghost.get()) { |