diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-27 13:39:13 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-27 13:39:13 +0000 |
commit | 1d255b7b1ec01d6685a1f57c5583a8a362bc98c0 (patch) | |
tree | e8efd1fd37d7baac4bd3db48be3e459365902d1d /crawl-ref/source/spl-cast.cc | |
parent | 9b2e7b1002d1917e65b15e2e6b69936774b5e02e (diff) | |
download | crawl-ref-1d255b7b1ec01d6685a1f57c5583a8a362bc98c0.tar.gz crawl-ref-1d255b7b1ec01d6685a1f57c5583a8a362bc98c0.zip |
Backport r10426 and r10427.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10428 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index a71cee4c16..1ea11adf47 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -2283,12 +2283,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); |