Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2264:a0ffc18d3185 HEAD
body_offset wasn't set if mail had no header.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 02 Jul 2004 16:34:37 +0300 |
parents | 010088ee72de |
children | 1def5ca25efd |
files | src/lib-storage/index/mbox/istream-raw-mbox.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c Fri Jul 02 15:45:53 2004 +0300 +++ b/src/lib-storage/index/mbox/istream-raw-mbox.c Fri Jul 02 16:34:37 2004 +0300 @@ -203,7 +203,9 @@ fromp = mbox_from; from_start_pos = 0; eoh_char = rstream->body_offset == (uoff_t)-1 ? '\n' : '\0'; for (i = stream->pos; i < pos; i++) { - if (buf[i] == eoh_char && i > 0 && buf[i-1] == '\n') { + if (buf[i] == eoh_char && + ((i > 0 && buf[i-1] == '\n') || + stream->istream.v_offset + i == rstream->hdr_offset)) { rstream->body_offset = stream->istream.v_offset + i + 1; eoh_char = '\0'; }