summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/state.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-20 12:35:10 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-20 12:35:10 +0000
commit327c313f2b43ee129b1f9c7b0bf74535f86e726b (patch)
tree1521668090c0d9e4640b8c35a39709827e83d964 /crawl-ref/source/state.cc
parent9c8871bc3e50d51e3898ff5594b9d4f73f15c55b (diff)
downloadcrawl-ref-327c313f2b43ee129b1f9c7b0bf74535f86e726b.tar.gz
crawl-ref-327c313f2b43ee129b1f9c7b0bf74535f86e726b.zip
Was using wrong method to get the last element of a vector.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8624 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/state.cc')
-rw-r--r--crawl-ref/source/state.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index 55cb88d0ff..9cf8e30b1a 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -400,9 +400,10 @@ void game_state::dec_mon_acting(monsters* mon)
mon_act = NULL;
- if (mon_act_stack.size() > 0)
+ const unsigned int size = mon_act_stack.size();
+ if (size > 0)
{
- mon_act = *(mon_act_stack.end());
+ mon_act = mon_act_stack[size - 1];
ASSERT(!invalid_monster(mon_act));
mon_act_stack.pop_back();
}