|
From: <gi...@cr...> - 2012-02-28 21:06:24
|
via 20d85c6d54913ce770cdab361d351f8a057143a5 (commit)
from 6e717ffc52f2abadf9d55aa1e0ee1cf2cd8822e5 (commit)
-----------------------------------------------------------------------
commit 20d85c6d54913ce770cdab361d351f8a057143a5
Author: Adam Borowski <kil...@an...>
Date: Tue Feb 28 22:02:17 2012 +0100
Fix an infinite loop if HUP happens during Stack Five.
(cherry picked from commit eb127b30c542ba4405abb20af62fe2dd79431ca7)
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/decks.cc | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 80c9f25..8f40b78 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1130,6 +1130,11 @@ bool deck_stack()
_redraw_stacked_cards(draws, selected);
}
+ // If you HUP the game, you lose the opportunity for further
+ // stacking, but you might have already ordered some, no need
+ // to destroy that.
+ else if (c == CK_ESCAPE && crawl_state.seen_hups)
+ break; // TODO: continue on game restore instead?
}
redraw_screen();
}
--
Dungeon Crawl Stone Soup
|