summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ghost.cc
diff options
context:
space:
mode:
authorDarshan Shaligram <dshaligram@users.sourceforge.net>2009-12-30 20:53:40 +0530
committerDarshan Shaligram <dshaligram@users.sourceforge.net>2009-12-30 20:53:40 +0530
commit71dd6514367e7a345fa9d2480c353c93826c5b84 (patch)
treec15efd32a1b55bc34c4614ba469b778e98dfd302 /crawl-ref/source/ghost.cc
parent0de7915012693aa9f2b690e0ec581060eb10e51e (diff)
downloadcrawl-ref-71dd6514367e7a345fa9d2480c353c93826c5b84.tar.gz
crawl-ref-71dd6514367e7a345fa9d2480c353c93826c5b84.zip
[Mantis 270] Fix excessive ghosts on early levels.
Diffstat (limited to 'crawl-ref/source/ghost.cc')
-rw-r--r--crawl-ref/source/ghost.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc
index e20e7e2317..1a5885f909 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())
{