summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/mutation.cc2
-rw-r--r--crawl-ref/source/religion.cc10
2 files changed, 5 insertions, 7 deletions
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index dff939322b..729d46df4b 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -2780,7 +2780,7 @@ bool perma_mutate(mutation_type which_mut, int how_much)
bool give_bad_mutation(bool failMsg, bool force_mutation)
{
- mutation_type mutat;
+ mutation_type mutat = NUM_MUTATIONS;
switch (random2(12))
{
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3b35d2d870..ae2e05a4d6 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1097,11 +1097,6 @@ bool bless_follower(int follower,
bool (*suitable)(const monsters* mon),
bool force)
{
- std::string result;
- monsters *mon;
-
- int chance = (force ? coinflip() : random2(20));
-
// If a follower was specified, and it's suitable, pick it.
// Otherwise, pick a random follower within sight of the player.
if (follower == -1 || (!force && !suitable(&menv[follower])))
@@ -1157,7 +1152,10 @@ bool bless_follower(int follower,
ASSERT(follower != -1 && follower != NON_MONSTER);
// Else, apply blessing to chosen follower.
- mon = &menv[follower];
+ monsters *mon = &menv[follower];
+
+ int chance = (force ? coinflip() : random2(20));
+ std::string result;
if (chance == 0) // 5% chance of holy branding, or priesthood
{