From ce03c65515786c7f3c019314fe44019258236a94 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Tue, 1 Apr 2008 16:07:23 +0000 Subject: Slime:6 teleport control is enabled even if you kill the royal jelly off-level (sorear). TC is also enabled when banishing the royal jelly, which is a bit cheesy... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4026 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-util.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/spl-util.cc') diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 7f6adfe75d..abf3ebabc6 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -114,10 +114,10 @@ spell_type spell_by_name(std::string name, bool partial_match) for (int i = 0; i < NUM_SPELLS; i++) { spell_type type = static_cast(i); - const char *sptitle = spell_title(type); - if (!sptitle) + if (!is_valid_spell(type)) continue; - + + const char *sptitle = spell_title(type); const std::string spell_name = lowercase_string(sptitle); if (spell_name.find(name) != std::string::npos) -- cgit v1.2.3-54-g00ecf