diff --git a/src/report.c b/src/report.c index 7e47d609b..3976bb05b 100644 --- a/src/report.c +++ b/src/report.c @@ -723,8 +723,9 @@ rp_messages(struct stream *out, message_list * msgs, faction * viewer, int inden int k = 0; struct mlist *m = msgs->begin; while (m) { - /* messagetype * mt = m->type; */ - if (!categorized || strcmp(m->msg->type->section, section) == 0) { + /* categorized messages need a section: */ + assert(!categorized || (m->msg->type->section != NULL)); + if (!categorized || m->msg->type->section == section) { char lbuf[8192]; if (!k && categorized) { @@ -2312,11 +2313,11 @@ report_plaintext(const char *filename, report_context * ctx, message_list *mlist = r_getmessages(r, f); if (mlist) { struct mlist **split = merge_messages(mlist, r->msgs); - rp_messages(out, mlist, f, 0, true); + rp_messages(out, mlist, f, 0, false); split_messages(mlist, split); } else { - rp_messages(out, r->msgs, f, 0, true); + rp_messages(out, r->msgs, f, 0, false); } }