Commit c7491f22 c7491f228d5fce68e50192d26a98ecf8115f5283 by Sergey Poznyakoff

Fix mime test.

* mailbox/mime.c (mu_mime_get_part): Fix the end limit for the
part's abridgement.
* mailbox/streamref.c (_streamref_seek): Fix ESPIPE condition.
1 parent e7b40d4e
......@@ -895,7 +895,7 @@ mu_mime_get_part (mu_mime_t mime, size_t part, mu_message_t *msg)
ret = mu_streamref_create_abridged (&stream, mime->stream,
mime_part->offset,
mime_part->offset +
mime_part->len);
mime_part->len - 1);
if (ret == 0)
{
mu_stream_set_flags (stream,
......
......@@ -169,7 +169,7 @@ _streamref_seek (struct _mu_stream *str, mu_off_t off, mu_off_t *ppos)
size -= sp->start;
}
if (off < 0 || off >= size)
if (off < 0 || off > size)
return sp->stream.last_err = ESPIPE;
rc = mu_stream_seek (sp->transport, sp->start + off, MU_SEEK_SET,
&sp->offset);
......