tmphdr->env = mutt_new_envelope ();
mutt_make_forward_subject (tmphdr->env, Context, parent);
- mutt_mktemp (tmpbody);
+ mutt_mktemp (tmpbody, sizeof (tmpbody));
if ((tmpfp = safe_fopen (tmpbody, "w")) == NULL)
{
mutt_error (_("Can't open temporary file %s."), tmpbody);
/* no MIME encapsulation */
- mutt_mktemp (tmpbody);
+ mutt_mktemp (tmpbody, sizeof (tmpbody));
if (!(tmpfp = safe_fopen (tmpbody, "w")))
{
mutt_error (_("Can't create %s."), tmpbody);
return;
}
- mutt_mktemp (tmpbody);
+ mutt_mktemp (tmpbody, sizeof (tmpbody));
if ((tmpfp = safe_fopen (tmpbody, "w")) == NULL)
{
mutt_error (_("Can't create %s."), tmpbody);
safe_fclose (&tmpfp);
- if (ci_send_message (flags, tmphdr, tmpbody, NULL, parent) == 0)
+ if (ci_send_message (flags, tmphdr, tmpbody, NULL,
+ parent ? parent : (cur ? cur->hdr : NULL)) == 0)
mutt_set_flag (Context, hdr, M_REPLIED, 1);
}