From: Pierre Habouzit Date: Mon, 4 Dec 2006 08:34:17 +0000 (+0100) Subject: small regressions. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=59f5843ea1ff2f68a60ceaeb497cf195bb512238;p=apps%2Fmadmutt.git small regressions. Signed-off-by: Pierre Habouzit --- diff --git a/send.c b/send.c index 86a6f35..acb01af 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);