Misc Fixes
This commit is contained in:
parent
d9793ab37d
commit
8979046d6a
@ -417,7 +417,7 @@ char *www_email_display(struct user_record *user, int email) {
|
||||
strcat(page, buffer);
|
||||
len += strlen(buffer);
|
||||
|
||||
sprintf(buffer, "> ");
|
||||
sprintf(buffer, "> ");
|
||||
if (len + strlen(buffer) > max_len - 1) {
|
||||
max_len += 4096;
|
||||
page = (char *)realloc(page, max_len);
|
||||
@ -429,10 +429,10 @@ char *www_email_display(struct user_record *user, int email) {
|
||||
|
||||
for (i=0;i<strlen(body);i++) {
|
||||
if (body[i] == '\r') {
|
||||
sprintf(buffer, "\n> ");
|
||||
sprintf(buffer, "\n> ");
|
||||
chars = 0;
|
||||
} else if (chars == 78) {
|
||||
sprintf(buffer, "\n> %c", body[i]);
|
||||
sprintf(buffer, "\n> %c", body[i]);
|
||||
chars = 1;
|
||||
} else {
|
||||
sprintf(buffer, "%c", body[i]);
|
||||
|
12
www_msgs.c
12
www_msgs.c
@ -299,7 +299,8 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
body = (char *)malloc(jmh.TxtLen);
|
||||
body = (char *)malloc(jmh.TxtLen + 1);
|
||||
memset(body, 0, jmh.TxtLen + 1);
|
||||
|
||||
JAM_ReadMsgText(jb, jmh.TxtOffset,jmh.TxtLen, (char *)body);
|
||||
|
||||
@ -501,7 +502,7 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
|
||||
strcat(page, buffer);
|
||||
len += strlen(buffer);
|
||||
|
||||
sprintf(buffer, "> ");
|
||||
sprintf(buffer, "> ");
|
||||
if (len + strlen(buffer) > max_len - 1) {
|
||||
max_len += 4096;
|
||||
page = (char *)realloc(page, max_len);
|
||||
@ -511,12 +512,12 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
|
||||
|
||||
chars = 0;
|
||||
|
||||
for (i=0;i<strlen(body);i++) {
|
||||
for (i=0;i<jmh.TxtLen;i++) {
|
||||
if (body[i] == '\r') {
|
||||
sprintf(buffer, "\n> ");
|
||||
sprintf(buffer, "\n> ");
|
||||
chars = 0;
|
||||
} else if (chars == 78) {
|
||||
sprintf(buffer, "\n> %c", body[i]);
|
||||
sprintf(buffer, "\n> %c", body[i]);
|
||||
chars = 1;
|
||||
} else {
|
||||
sprintf(buffer, "%c", body[i]);
|
||||
@ -745,6 +746,7 @@ int www_send_msg(struct user_record *user, char *to, char *subj, int conference,
|
||||
for (z =0;z < strlen(body); z++) {
|
||||
if (body[z] != '\n') {
|
||||
body2[pos++] = body[z];
|
||||
body2[pos] = '\0';
|
||||
}
|
||||
}
|
||||
strcat(body2, buffer);
|
||||
|
Reference in New Issue
Block a user