jcs
/subtext
/amendments
/163
mail: Use session_output to print message body, not printf
jcs made amendment 163 over 2 years ago
--- mail.c Sun Jun 12 22:25:08 2022
+++ mail.c Wed Jun 22 15:59:54 2022
@@ -426,10 +426,11 @@ mail_list(struct session *s, size_t nmail_ids, unsigne
user ? user->username : "(unknown)",
msg.subject,
msg.read ? "" : ansi(s, ANSI_RESET, ANSI_END));
- session_flush(s);
mail_free_message_strings(&msg);
}
+
+ session_flush(s);
}
short
@@ -481,7 +482,7 @@ mail_read(struct session *s, unsigned long id, short i
session_printf(s, "{{B}}Subject:{{/B}}{{#}} %s\r\n", msg.subject);
session_flush(s);
session_printf(s, "\r\n");
- session_printf(s, msg.body);
+ session_output(s, msg.body, msg.body_size);
session_printf(s, "\r\n");
session_flush(s);