summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dbg-asrt.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-04-09 12:52:19 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-04-09 12:52:19 +0200
commit7872dfe2f1dbb0966d738d918151614cfc2e8074 (patch)
treef95f6433150b6a59569950737c98e56d580eabe6 /crawl-ref/source/dbg-asrt.cc
parentb3860d843f61ceb4113a9eeb230063d3a53b9e9e (diff)
downloadcrawl-ref-7872dfe2f1dbb0966d738d918151614cfc2e8074.tar.gz
crawl-ref-7872dfe2f1dbb0966d738d918151614cfc2e8074.zip
Fix a possible infinite loop when dumping.
If all messages in the buffer are not "dumpworthy" (MSGCH_EQUIPMENT, MSGCH_DIAGNOSTICS or MSGCH_TUTORIAL), it'll spin forever. This commit also removes such racism if the dump happens during a crash: we do want to see debug output.
Diffstat (limited to 'crawl-ref/source/dbg-asrt.cc')
-rw-r--r--crawl-ref/source/dbg-asrt.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/dbg-asrt.cc b/crawl-ref/source/dbg-asrt.cc
index 7c685badc7..8bfc6ce48d 100644
--- a/crawl-ref/source/dbg-asrt.cc
+++ b/crawl-ref/source/dbg-asrt.cc
@@ -675,7 +675,7 @@ void do_crash_dump()
{
fprintf(file, "\nMessages:\n");
fprintf(file, "<<<<<<<<<<<<<<<<<<<<<<\n");
- string messages = get_last_messages(NUM_STORED_MESSAGES);
+ string messages = get_last_messages(NUM_STORED_MESSAGES, true);
fprintf(file, "%s", messages.c_str());
fprintf(file, ">>>>>>>>>>>>>>>>>>>>>>\n");
}