summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/output.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-13 19:53:17 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-13 19:53:17 +0000
commitf9d71155f40456efd6ec04f0e245d712fef617e1 (patch)
treec40062e9e40503a446d98e2c0d4e043d57d80346 /crawl-ref/source/output.cc
parent5006c1e3f3d193c18cd2bf76a50163fbab1b8052 (diff)
downloadcrawl-ref-f9d71155f40456efd6ec04f0e245d712fef617e1.tar.gz
crawl-ref-f9d71155f40456efd6ec04f0e245d712fef617e1.zip
Fix the monster list not updating if no monsters are left, i.e. if you
just killed the last one. (Whoops!) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6530 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index a162edfcfc..8c7fdaf49d 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -1489,9 +1489,6 @@ int update_monster_pane()
std::vector<monster_pane_info> mons;
get_monster_pane_info(mons);
- if (mons.empty())
- return (-1);
-
std::sort(mons.begin(), mons.end(), monster_pane_info::less_than);
// Count how many groups of monsters there are
@@ -1547,6 +1544,9 @@ int update_monster_pane()
cprintf(" ... ");
}
+ if (mons.empty())
+ return (-1);
+
return full_info;
}
#else