summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authorDarshan Shaligram <dshaligram@users.sourceforge.net>2010-01-03 22:59:40 +0530
committerDarshan Shaligram <dshaligram@users.sourceforge.net>2010-01-03 22:59:40 +0530
commit27ac9ff237dc68d9b5562d73b3ac5ba37070a828 (patch)
tree959bb7b26fc012c3d1e389192ffdbc8e1498bc11 /crawl-ref/source/makeitem.cc
parent087f00c2fbbe26c2442e8e012e2b77cde9faaf06 (diff)
downloadcrawl-ref-27ac9ff237dc68d9b5562d73b3ac5ba37070a828.tar.gz
crawl-ref-27ac9ff237dc68d9b5562d73b3ac5ba37070a828.zip
Fix game crash on generating needles.
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 8ab2baa966..bfa26805b1 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -1837,7 +1837,7 @@ static special_missile_type _determine_missile_brand(const item_def& item,
random_choose_weighted(30, SPMSL_PARALYSIS, 30, SPMSL_SLOW,
30, SPMSL_SLEEP, 40, SPMSL_CONFUSION,
20, SPMSL_SICKNESS, 10, SPMSL_RAGE,
- nw, SPMSL_POISONED));
+ nw, SPMSL_POISONED, 0));
break;
case MI_DART:
rc = static_cast<special_missile_type>(
@@ -1898,11 +1898,7 @@ static special_missile_type _determine_missile_brand(const item_def& item,
if (get_equip_race(item) == ISFLAG_ORCISH && one_chance_in(3))
rc = SPMSL_POISONED;
- bool missile_brand_ok = is_missile_brand_ok(item.sub_type, rc);
- if (!missile_brand_ok)
- {
- ASSERT(false);
- }
+ ASSERT(is_missile_brand_ok(item.sub_type, rc));
return rc;
}