openexr icon indicating copy to clipboard operation
openexr copied to clipboard

C_IStream::read returns wrong EOF status

Open zopsicle opened this issue 3 years ago • 1 comments

The documentation for IStream::read reads:

If read(c,n) reads the last byte from the file it returns false, otherwise it returns true.

The man page for feof reads:

The function feof() tests the end-of-file indicator for the stream pointed to by stream, returning nonzero if it is set.

The C_IStream::read example over at https://openexr.readthedocs.io/en/latest/ReadingAndWritingImageFiles.html returns feof (_file).

But I think it should return ! feof (_file), or am I misunderstanding the IStream API?

zopsicle avatar Jul 12 '22 00:07 zopsicle

Thanks for the catch, #1292 corrects it.

cary-ilm avatar Oct 31 '22 02:10 cary-ilm