From 33cd5f7627dde3804aba172a68b994def4de896d Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 27 Jul 2009 13:32:04 +0000 Subject: Disallow vaults placing shaft traps if shafts are disallowed on that level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10427 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-cast.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/spl-cast.cc') diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 8dfbd94993..d20fc01ee7 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -2272,12 +2272,13 @@ static unsigned int _breakpoint_rank(int val, const int breakpoints[], unsigned int result = 0; while (result < num_breakpoints && val >= breakpoints[result]) ++result; + return result; } const char* spell_hunger_string( spell_type spell ) { - if ( you.is_undead == US_UNDEAD ) + if (you.is_undead == US_UNDEAD) return "N/A"; const int hunger = spell_hunger(spell); -- cgit v1.2.3-54-g00ecf