forked from github/server
fix crash in region messages.
This commit is contained in:
parent
b3b19e7c83
commit
226fa2ba08
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue