Attempt to fix cut off messages
This commit is contained in:
parent
b94dbb4fa1
commit
9e76b50b8e
@ -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<totlen;i++) {
|
||||
if (body[i] == '\n') {
|
||||
continue;
|
||||
} else if (body[i] == '\0') {
|
||||
continue;
|
||||
}
|
||||
body2[j++] = body[i];
|
||||
body2[j] = '\0';
|
||||
|
Reference in New Issue
Block a user