openexr
openexr copied to clipboard
C_IStream::read returns wrong EOF status
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?
Thanks for the catch, #1292 corrects it.