diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2002-12-09 18:26:26 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2002-12-09 18:26:26 +0000 |
commit | 8a24627898025ccf0448dd3c4681a2bf78e31446 (patch) | |
tree | 110c86d92933fa083cab98038a6b39d80aa113d7 /rfc822.c | |
parent | d4b0e0d96914ece6bade2eb2552d4a4eb6526ed8 (diff) |
Experimental patch to fix #1318.
Diffstat (limited to 'rfc822.c')
-rw-r--r-- | rfc822.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -331,6 +331,7 @@ add_addrspec (ADDRESS **top, ADDRESS **last, const char *phrase, ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s) { + int ws_pending; const char *begin, *ps; char comment[STRING], phrase[STRING]; size_t phraselen = 0, commentlen = 0; @@ -342,6 +343,8 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s) while (last && last->next) last = last->next; + ws_pending = isspace (*s); + SKIPWS (s); begin = s; while (*s) @@ -465,7 +468,7 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s) } else { - if (phraselen && phraselen < sizeof (phrase) - 1 && *s != '.') + if (phraselen && phraselen < sizeof (phrase) - 1 && ws_pending) phrase[phraselen++] = ' '; if ((ps = next_token (s, phrase, &phraselen, sizeof (phrase) - 1)) == NULL) { @@ -474,6 +477,7 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s) } s = ps; } + ws_pending = isspace (*s); SKIPWS (s); } |