X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=send.c;h=2143f19804b06c7d343a227c59a7a4e9e72d90bb;hp=86a6f35cd250065c7c44ecfeca30850f631872b2;hb=cc707c1e986b60f2c1c1932d0789038d465a7a59;hpb=07ccefd6c97ddd433d8432f7b4596a5572e09b48 diff --git a/send.c b/send.c index 86a6f35..2143f19 100644 --- a/send.c +++ b/send.c @@ -292,7 +292,7 @@ static void process_user_recips (ENVELOPE * env) if (!p) continue; - switch (mime_which_token(uh->data, p - uh->data)) { + switch (mime_which_token(uh->data, p++ - uh->data)) { case MIME_TO: env->to = rfc822_parse_adrlist(env->to, p); break; @@ -325,8 +325,10 @@ static void process_user_header(ENVELOPE * env) for (uh = UserHeader; uh; uh = uh->next) { const char *p = strchr(uh->data, ':'); + if (!p) + continue; - switch (mime_which_token(uh->data, (p ?: uh->data) - uh->data)) { + switch (mime_which_token(uh->data, p++ - uh->data)) { case MIME_FROM: /* User has specified a default From: address. Remove default address */ address_list_wipe(&env->from); @@ -1289,7 +1291,7 @@ int ci_send_message (int flags, /* send mode */ process_user_header (msg->env); - if (option (OPTSIGONTOP) && (!(flags & SENDKEY) && Editor)) + if (option (OPTSIGONTOP) && (!(flags & SENDKEY))) append_signature (tempfp); /* include replies/forwarded messages, unless we are given a template */ @@ -1297,7 +1299,7 @@ int ci_send_message (int flags, /* send mode */ && generate_body (tempfp, msg, flags, ctx, cur) == -1) goto cleanup; - if (!option (OPTSIGONTOP) && (!(flags & SENDKEY) && Editor)) + if (!option (OPTSIGONTOP) && (!(flags & SENDKEY))) append_signature (tempfp); /* @@ -1403,12 +1405,11 @@ int ci_send_message (int flags, /* send mode */ goto cleanup; } else if (option (OPTEDITHDRS)) { mutt_env_to_local (msg->env); - mutt_edit_headers (Editor, msg->content->filename, msg, fcc, - sizeof (fcc)); + mutt_edit_headers(msg->content->filename, msg, fcc, sizeof (fcc)); mutt_env_to_idna (msg->env, NULL, NULL); } else { - mutt_edit_file (Editor, msg->content->filename); + mutt_edit_file(msg->content->filename); if (stat (msg->content->filename, &st) == 0) { if (mtime != st.st_mtime)