summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 16f528d3e8..613ea17f5a 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1415,7 +1415,9 @@ static void _input()
{
// User pressed a key, so stop repeating commands and discard
// the keypress.
- crawl_state.cancel_cmd_repeat();
+ crawl_state.cancel_cmd_repeat("Key pressed, interrupting command "
+ "repetition.");
+ crawl_state.prev_cmd = CMD_NO_CMD;
getchm();
return;
}
@@ -4285,7 +4287,8 @@ static void _setup_cmd_repeat()
{
repeat_again_rec.keys.pop_front();
}
- while (repeat_again_rec.keys[0] != ch);
+ while (repeat_again_rec.keys.size() > 0
+ && repeat_again_rec.keys[0] != ch);
repeat_again_rec.keys.pop_front();
}