From 02bcdf87cccb6925b842afcfeb3931f62ac8c4a1 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Thu, 8 Dec 2016 14:17:54 +1000 Subject: [PATCH] Fix internal editor quoting --- bbs.h | 2 +- mail_menu.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bbs.h b/bbs.h index 6a5d945..7af09eb 100644 --- a/bbs.h +++ b/bbs.h @@ -221,7 +221,7 @@ extern void free_message_headers(struct msg_headers *msghs); extern struct msg_headers *read_message_headers(int msgconf, int msgarea, struct user_record *user); extern void mail_scan(struct user_record *user); extern int mail_menu(struct user_record *user); -extern char *editor(struct user_record *user, char *quote, char *from, int email); +extern char *editor(struct user_record *user, char *quote, int qlen, char *from, int email); extern char *external_editor(struct user_record *user, char *to, char *from, char *quote, int qlen, char *qfrom, char *subject, int email); extern int msg_is_to(struct user_record *user, char *addressed_to, char *address, int type, int rn, int msgconf); extern int msg_is_from(struct user_record *user, char *addressed_from, char *address, int type, int rn, int msgconf); diff --git a/mail_menu.c b/mail_menu.c index 2995a0f..c2ff52d 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -547,10 +547,10 @@ char *external_editor(struct user_record *user, char *to, char *from, char *quot return body2; } } - return editor(user, quote, qfrom, email); + return editor(user, quote, qlen, qfrom, email); } -char *editor(struct user_record *user, char *quote, char *from, int email) { +char *editor(struct user_record *user, char *quote, int quotelen, char *from, int email) { int lines = 0; char buffer[256]; char linebuffer[80]; @@ -571,7 +571,7 @@ char *editor(struct user_record *user, char *quote, char *from, int email) { memset(next_line_buffer, 0, 80); if (quote != NULL) { - for (i=0;i