Fixed improper use of header_aget_value().
Showing
1 changed file
with
9 additions
and
6 deletions
... | @@ -79,12 +79,15 @@ mail_reply(int argc, char **argv) | ... | @@ -79,12 +79,15 @@ mail_reply(int argc, char **argv) |
79 | header_aget_value(hdr, MU_HEADER_CC, &env.cc); | 79 | header_aget_value(hdr, MU_HEADER_CC, &env.cc); |
80 | } | 80 | } |
81 | 81 | ||
82 | header_aget_value(hdr, MU_HEADER_SUBJECT, &str); | 82 | if (header_aget_value(hdr, MU_HEADER_SUBJECT, &str) == 0) |
83 | if (str && strncasecmp (str, "Re:", 3)) | 83 | { |
84 | util_strcat(&env.subj, "Re: "); | 84 | if (strncasecmp (str, "Re:", 3)) |
85 | util_strcat(&env.subj, str); | 85 | util_strcat (&env.subj, "Re: "); |
86 | free(str); | 86 | util_strcat (&env.subj, str); |
87 | 87 | free (str); | |
88 | } | ||
89 | else | ||
90 | util_strcat (&env.subj, ""); | ||
88 | fprintf(ofile, "To: %s\n", env.to); | 91 | fprintf(ofile, "To: %s\n", env.to); |
89 | if (env.cc) | 92 | if (env.cc) |
90 | fprintf(ofile, "Cc: %s\n", env.cc); | 93 | fprintf(ofile, "Cc: %s\n", env.cc); | ... | ... |
-
Please register or sign in to post a comment