From: pdmef Date: Sun, 27 Feb 2005 00:55:44 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=be99cd72fc79e2f10aec2b06d62abb16c16aa34d Rocco Rutte: fixed bug in address parsing that bothered me for _years_ git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@94 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/parse.c b/parse.c index b8fa55f..6a07654 100644 --- a/parse.c +++ b/parse.c @@ -1057,6 +1057,15 @@ int mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p, short if (!ascii_strcasecmp ("rom", line + 1)) { e->from = rfc822_parse_adrlist (e->from, p); + /* don't leave from info NULL if there's an invalid address (or + * whatever) in From: field; mutt would just display it as empty + * and mark mail/(esp.) news article as your own. aaargh! this + * bothered me for _years_ */ + if (!e->from) + { + e->from = rfc822_new_address (); + e->from->personal = safe_strdup (line+6); + } matched = 1; } #ifdef USE_NNTP