From 9cae2f059ad75fbfa4584e366aeda5c59d2807eb Mon Sep 17 00:00:00 2001 From: haranp Date: Fri, 12 Sep 2008 00:50:04 +0000 Subject: Fix 2059408: wrong message when Triple Draw finishes an unidentified deck. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6906 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/decks.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crawl-ref/source/decks.cc') diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index 012de36daf..dec9f69b8f 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -1065,6 +1065,11 @@ bool deck_triple_draw() const int num_cards = cards_in_deck(deck); + // We have to identify the deck before removing cards from it. + // Otherwise, _remember_drawn_card() will implicitly call + // _deck_ident() when the deck might have no cards left. + _deck_ident(deck); + if (num_cards == 1) { // Only one card to draw, so just draw it. -- cgit v1.2.3-54-g00ecf