summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/newgame.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-24 09:57:33 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-24 09:57:49 +0200
commit9d69ea03a92d200d047531e5c288274dcc7a2690 (patch)
treef50d8c43d6fc023f7a45c5e28f99cadaf8170875 /crawl-ref/source/newgame.cc
parent9c08ad575dfa4fbfcbdff5280a582a7846094f60 (diff)
downloadcrawl-ref-9d69ea03a92d200d047531e5c288274dcc7a2690.tar.gz
crawl-ref-9d69ea03a92d200d047531e5c288274dcc7a2690.zip
Fix Humans not being selectable on character selection.
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r--crawl-ref/source/newgame.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index b69c5468e5..b102608ff0 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -223,7 +223,7 @@ int give_first_conjuration_book()
// primarily used to suppress the display of the draconian variants.
static bool _is_species_valid_choice(species_type species, bool display = true)
{
- if (!species) // Species only start at 1.
+ if (species < 0 || species > NUM_SPECIES)
return (false);
if (species >= SP_ELF) // These are all invalid.
@@ -4188,8 +4188,8 @@ spec_query:
textcolor( LIGHTGREY );
- int j = 0;
- for (int i = 0; i < ng_num_species(); ++i)
+ int i = -1;
+ for (i = 0; i < ng_num_species(); ++i)
{
const species_type si = get_species(i);
@@ -4221,17 +4221,15 @@ spec_query:
cprintf("%c - %s", sletter, species_name(si, 1).c_str());
}
- if (j % 2)
+ if (i % 2)
cprintf(EOL);
else
cgotoxy(31, wherey());
textcolor(LIGHTGREY); // Reset text colour.
-
- j++;
}
- if (j % 2)
+ if (i % 2)
cprintf(EOL);
textcolor( BROWN );