Change the way quoting works.

This commit is contained in:
Andrew Pamment 2016-04-07 12:42:25 +10:00
parent b9e7e995b9
commit aa0185000a

View File

@ -275,7 +275,7 @@ char *editor(int socket, struct user_record *user, char *quote, char *from) {
if (quote != NULL) { if (quote != NULL) {
for (i=0;i<strlen(quote);i++) { for (i=0;i<strlen(quote);i++) {
if (quote[i] == '\r' || lineat == 75) { if (quote[i] == '\r' || lineat == 68) {
if (quotelines == 0) { if (quotelines == 0) {
quotecontent = (char **)malloc(sizeof(char *)); quotecontent = (char **)malloc(sizeof(char *));
} else { } else {
@ -287,6 +287,9 @@ char *editor(int socket, struct user_record *user, char *quote, char *from) {
quotelines++; quotelines++;
lineat = 0; lineat = 0;
linebuffer[0] = '\0'; linebuffer[0] = '\0';
if (quote[i] != '\r') {
i--;
}
} else { } else {
linebuffer[lineat++] = quote[i]; linebuffer[lineat++] = quote[i];
linebuffer[lineat] = '\0'; linebuffer[lineat] = '\0';