Fix bug with xref stream with no index.

Fix bug with pdfiOStreamPeek not appending new stream data to buffer.

Add more debug printfs for values.
This commit is contained in:
Michael R Sweet
2021-08-24 13:49:43 -04:00
parent 4ec19545f3
commit 6745f785b7
3 changed files with 24 additions and 15 deletions

View File

@@ -514,7 +514,7 @@ pdfioStreamPeek(pdfio_stream_t *st, // I - Stream
st->bufptr = st->buffer;
st->bufend = st->buffer + remaining;
if ((rbytes = stream_read(st, st->bufptr, sizeof(st->buffer) - remaining)) > 0)
if ((rbytes = stream_read(st, st->bufend, sizeof(st->buffer) - remaining)) > 0)
{
st->bufend += rbytes;
remaining += (size_t)rbytes;