summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fineff.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-11-16 12:17:36 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-11-16 12:17:36 +0100
commitce4d1fc2da260552b021ff014f0c8cbb0af47411 (patch)
treea595a6072ffa98577e9333e581701293ebecc470 /crawl-ref/source/fineff.cc
parentb1d0cd1e1d9bdd499ca98dbb8a48e5d3fba3fcb0 (diff)
downloadcrawl-ref-ce4d1fc2da260552b021ff014f0c8cbb0af47411.tar.gz
crawl-ref-ce4d1fc2da260552b021ff014f0c8cbb0af47411.zip
Fix a Royal Jelly + fire vortex crash.
Diffstat (limited to 'crawl-ref/source/fineff.cc')
-rw-r--r--crawl-ref/source/fineff.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/fineff.cc b/crawl-ref/source/fineff.cc
index 34268a5a1a..087cebc2f7 100644
--- a/crawl-ref/source/fineff.cc
+++ b/crawl-ref/source/fineff.cc
@@ -194,8 +194,10 @@ void trj_spawn_fineff::fire()
dprf("Trying to spawn %d jellies.", tospawn);
- unsigned short foe = attack && attack->alive() ? attack->mindex()
- : MHITNOT;
+ unsigned short foe = attack && attack->alive() ? attack->mindex() : MHITNOT;
+ // may be ANON_FRIENDLY_MONSTER
+ if (invalid_monster_index(foe) && foe != MHITYOU)
+ foe = MHITNOT;
int spawned = 0;
for (int i = 0; i < tospawn; ++i)