Some experimental fixes to External editing
This commit is contained in:
parent
4f2cd6e4dd
commit
00168fc1bf
@ -343,15 +343,16 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body2 = (char *)malloc(strlen(body) + 19 + strlen(tagline));
|
body2 = (char *)malloc(totlen + 19 + strlen(tagline));
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
for (i=0;i<strlen(body);i++) {
|
for (i=0;i<totlen;i++) {
|
||||||
if (body[i] == '\n') {
|
if (body[i] == '\n') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
body2[j++] = body[i];
|
body2[j++] = body[i];
|
||||||
|
body2[j] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(buffer, "\r---\r * Origin: %s \r", tagline);
|
sprintf(buffer, "\r---\r * Origin: %s \r", tagline);
|
||||||
|
Reference in New Issue
Block a user