forked from github/server
Nobody needs to see empty messages in the CR
This commit is contained in:
parent
0fc37c9c59
commit
671e976ad6
2 changed files with 8 additions and 6 deletions
|
@ -522,10 +522,10 @@ static void render_messages(FILE * F, faction * f, message_list * msgs)
|
|||
#endif
|
||||
crbuffer[0] = '\0';
|
||||
if (cr_render(m->msg, crbuffer, (const void *)f) == 0) {
|
||||
if (!printed)
|
||||
if (crbuffer[0] && !printed) {
|
||||
fprintf(F, "MESSAGE %u\n", messagehash(m->msg));
|
||||
if (crbuffer[0])
|
||||
fputs(crbuffer, F);
|
||||
}
|
||||
} else {
|
||||
log_error("could not render cr-message %p: %s\n", m->msg, m->msg->type->name);
|
||||
}
|
||||
|
|
|
@ -30,11 +30,13 @@ extern "C" {
|
|||
|
||||
struct message_type;
|
||||
|
||||
typedef struct mlist {
|
||||
struct mlist *next;
|
||||
struct message *msg;
|
||||
};
|
||||
|
||||
typedef struct message_list {
|
||||
struct mlist {
|
||||
struct mlist *next;
|
||||
struct message *msg;
|
||||
} *begin, **end;
|
||||
struct mlist *begin, **end;
|
||||
} message_list;
|
||||
|
||||
extern void free_messagelist(message_list * msgs);
|
||||
|
|
Loading…
Reference in a new issue