summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pamment <apamment@yandex.com>2019-02-26 10:11:15 +1000
committerAndrew Pamment <apamment@yandex.com>2019-02-26 10:11:15 +1000
commitdca8e5972860b4b12a7a670997e241accd9f2e33 (patch)
tree62b6aae6fb137642722b0d92e65c8cc3db6af9ef
parent2d1e7872a40b941b936655f6c3d4fffb0b3791a3 (diff)
Fix some bugs in seenbys
-rwxr-xr-xsrc/mail_menu.c1
-rw-r--r--src/msglib/msglib_jam.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mail_menu.c b/src/mail_menu.c
index 6083822..e5a17e2 100755
--- a/src/mail_menu.c
+++ b/src/mail_menu.c
@@ -1443,6 +1443,7 @@ int read_message(struct user_record *user, struct msg_headers *msghs, int mailno
stralloc_cats(&body_salloc, msghs->msgs[mailno]->seenby);
stralloc_cats(&body_salloc, "\e[0m");
stralloc_cats(&body_salloc, body);
+ stralloc_0(&body_salloc);
free(body);
body = body_salloc.s;
}
diff --git a/src/msglib/msglib_jam.c b/src/msglib/msglib_jam.c
index 9e7d452..3dde2e0 100644
--- a/src/msglib/msglib_jam.c
+++ b/src/msglib/msglib_jam.c
@@ -120,14 +120,16 @@ struct msg_headers *jam_read_message_headers(int msgconf, int msgarea, struct us
} else if (jsp->Fields[z]->LoID == JAMSFLD_REPLYID) {
jamm->replyid = strndup(jsp->Fields[z]->Buffer, jsp->Fields[z]->DatLen);
} else if (jsp->Fields[z]->LoID == JAMSFLD_SEENBY2D) {
- stralloc_cats(&seenbybuff, "SEENBY: ");
+ stralloc_cats(&seenbybuff, "SEEN-BY: ");
stralloc_catb(&seenbybuff, jsp->Fields[z]->Buffer, jsp->Fields[z]->DatLen);
stralloc_append1(&seenbybuff, '\r');
+
}
}
JAM_DelSubPacket(jsp);
if (seenbybuff.len > 0) {
+ stralloc_0(&seenbybuff);
jamm->seenby = seenbybuff.s;
}
@@ -484,6 +486,7 @@ struct msg_t *jam_message_header(s_JamBase *jb, int id) {
}
if (seenbybuff.len > 0) {
+ stralloc_0(&seenbybuff);
jamm->seenby = seenbybuff.s;
}