summaryrefslogtreecommitdiff
path: root/src/birth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/birth.c')
-rw-r--r--src/birth.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/birth.c b/src/birth.c
index 243f080e..274b50bf 100644
--- a/src/birth.c
+++ b/src/birth.c
@@ -2331,16 +2331,17 @@ static bool_ player_birth_aux_ask()
}
else
{
- int *choice;
+ int choice[MAX_GODS];
int max = 0;
- C_MAKE(choice, max_gods, int);
-
/* Get the list of possible gods */
- for (n = 0; n < max_gods; n++)
+ for (n = 0; n < MAX_GODS; n++)
{
- if ((cp_ptr->gods | spp_ptr->gods) & BIT(n))
+ if (god_enabled(&deity_info[n]) &&
+ ((cp_ptr->gods | spp_ptr->gods) & BIT(n)))
+ {
choice[max++] = n;
+ }
}
if (!max)
@@ -2368,8 +2369,6 @@ static bool_ player_birth_aux_ask()
if (c == 'Q') quit(NULL);
if (c == 'S')
{
- C_FREE(choice, max_gods, int);
-
return (FALSE);
}
if (c == '*')
@@ -2424,8 +2423,6 @@ static bool_ player_birth_aux_ask()
else bell();
}
- C_FREE(choice, max_gods, int);
-
/* Set god */
p_ptr->pgod = k;
p_ptr->grace = 0;