forked from github/server
fix crash in region messages.
This commit is contained in:
parent
b3b19e7c83
commit
226fa2ba08
1 changed files with 5 additions and 4 deletions
|
@ -723,8 +723,9 @@ rp_messages(struct stream *out, message_list * msgs, faction * viewer, int inden
|
||||||
int k = 0;
|
int k = 0;
|
||||||
struct mlist *m = msgs->begin;
|
struct mlist *m = msgs->begin;
|
||||||
while (m) {
|
while (m) {
|
||||||
/* messagetype * mt = m->type; */
|
/* categorized messages need a section: */
|
||||||
if (!categorized || strcmp(m->msg->type->section, section) == 0) {
|
assert(!categorized || (m->msg->type->section != NULL));
|
||||||
|
if (!categorized || m->msg->type->section == section) {
|
||||||
char lbuf[8192];
|
char lbuf[8192];
|
||||||
|
|
||||||
if (!k && categorized) {
|
if (!k && categorized) {
|
||||||
|
@ -2312,11 +2313,11 @@ report_plaintext(const char *filename, report_context * ctx,
|
||||||
message_list *mlist = r_getmessages(r, f);
|
message_list *mlist = r_getmessages(r, f);
|
||||||
if (mlist) {
|
if (mlist) {
|
||||||
struct mlist **split = merge_messages(mlist, r->msgs);
|
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);
|
split_messages(mlist, split);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rp_messages(out, r->msgs, f, 0, true);
|
rp_messages(out, r->msgs, f, 0, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue