]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fix
authorTimo Sirainen <tss@iki.fi>
Wed, 29 Oct 2003 15:01:36 +0000 (17:01 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 29 Oct 2003 15:01:36 +0000 (17:01 +0200)
--HG--
branch : HEAD

src/lib-index/mbox/istream-mbox.c

index 2a7995fac43e22c86932366942fc828b3af38506..9d1c57b8d81e24376493a8c6f13ddc8846c38ba8 100644 (file)
@@ -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;
        }