From: Timo Sirainen Date: Wed, 29 Oct 2003 15:01:36 +0000 (+0200) Subject: fix X-Git-Tag: 1.1.alpha1~4251 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa63cc187122962342935fa6ea368dffaa768445;p=thirdparty%2Fdovecot%2Fcore.git fix --HG-- branch : HEAD --- diff --git a/src/lib-index/mbox/istream-mbox.c b/src/lib-index/mbox/istream-mbox.c index 2a7995fac4..9d1c57b8d8 100644 --- a/src/lib-index/mbox/istream-mbox.c +++ b/src/lib-index/mbox/istream-mbox.c @@ -78,10 +78,10 @@ static ssize_t _read(struct _istream *stream) mstream->istream.skip = 0; mstream->istream.buffer = i_stream_get_data(mstream->input, &pos); - if (pos == mstream->istream.pos) + if (pos <= mstream->istream.pos) ret = -1; else { - ret = mstream->istream.pos - pos; + ret = pos - mstream->istream.pos; mstream->istream.pos = pos; }