From 327c313f2b43ee129b1f9c7b0bf74535f86e726b Mon Sep 17 00:00:00 2001 From: zelgadis Date: Tue, 20 Jan 2009 12:35:10 +0000 Subject: 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 --- crawl-ref/source/state.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/state.cc') 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(); } -- cgit v1.2.3-54-g00ecf