From 9e76b50b8e66c2871d5c06c2b2e81019939df726 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 10 Apr 2016 19:30:43 +1000 Subject: [PATCH] Attempt to fix cut off messages --- mail_menu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mail_menu.c b/mail_menu.c index b608f0a..3584224 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -339,6 +339,8 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from body = (char *)realloc(body, totlen + 1); } + + memcpy(&body[totlen - len], buffer, len); body[totlen] = '\0'; @@ -365,6 +367,8 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from for (i=0;i