diff options
-rw-r--r-- | crawl-ref/source/religion.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/zotdef.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 195701706f..b3342f1bbf 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -3725,7 +3725,7 @@ god_type choose_god() msgwin_get_line("Which god (by name)? ", specs, sizeof(specs)); if (specs[0] == '\0') - return GOD_NO_GOD; + return NUM_GODS; string spec = lowercase_string(specs); diff --git a/crawl-ref/source/zotdef.cc b/crawl-ref/source/zotdef.cc index c3dc83c163..a0e7e89620 100644 --- a/crawl-ref/source/zotdef.cc +++ b/crawl-ref/source/zotdef.cc @@ -926,10 +926,11 @@ bool zotdef_create_altar() god_type god = choose_god(); - if (god == GOD_NO_GOD) + // "No god" or a bad god name (including pressing escape) + if (god == GOD_NO_GOD || god == NUM_GODS) return false; - if (god == NUM_GODS || !_can_make_altar(god)) + if (!_can_make_altar(god)) { mpr("That god doesn't seem to be taking followers today."); return false; |