1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +00:00

Fix previous commit

This commit is contained in:
Nikolas Garofil 2010-06-02 19:28:40 +02:00
parent d80c372a5c
commit 3fa1ca15e1

View File

@ -483,21 +483,22 @@ struct mail_s *parse_mail_args(char type, const char *arg)
if (len > MAXFOLDERSIZE-1) {
len = MAXFOLDERSIZE-1;
}
tmp++;
}
strncpy(mail->folder, tmp, len);
} else {
strncpy(mail->folder, "INBOX", MAXFOLDERSIZE); // default imap inbox
strncpy(mail->folder, "INBOX", MAXFOLDERSIZE-1); // default imap inbox
}
}
tmp = (char*)strstr(arg, "-e ");
if (tmp) {
int len = MAXFOLDERSIZE-1;
int len = 1024;
tmp += 3;
if (tmp[0] == '\'') {
len = (char*)strstr(tmp + 1, "'") - tmp - 1;
if (len > MAXFOLDERSIZE-1) {
len = MAXFOLDERSIZE-1;
if (len > 1024) {
len = 1024;
}
}
strncpy(mail->command, tmp + 1, len);