AmendHub

Download:

jcs

/

subtext

/

amendments

/

468

fidopkt: Don't add tear line unless we have an origin to add


jcs made amendment 468 about 1 year ago
--- fidopkt.c Wed Mar 15 13:59:07 2023 +++ fidopkt.c Fri Apr 7 14:56:15 2023 @@ -672,10 +672,13 @@ fidopkt_encode_message(struct fidopkt_message *msg, ch } else buf[off++] = msg->body[n]; } - /* add tear line */ - off += sprintf(buf + off, "\r\r--- \r"); + off += sprintf(buf + off, "\r\r"); + if (msg->origin[0]) { + /* add tear line */ + off += sprintf(buf + off, "--- \r"); + len = 11 + strlen(msg->origin) + 2; if (!grow_to_fit(&buf, &buf_size, off, len, len))