Skip to content

Commit

Permalink
Fix typo in the documentation's example reading class (#1292)
Browse files Browse the repository at this point in the history
The example C_IStream::read() function should return !feof(), not feof()

Signed-off-by: Cary Phillips <[email protected]>

Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm authored Nov 5, 2022
1 parent 043a508 commit 0ce7810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/ReadingAndWritingImageFiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ exception. If ``read(c,n)`` hits the end of the file after reading
throw Iex::InputExc ("Unexpected end of file.");
}
return feof (_file);
return !feof (_file);
}
``tellg()`` returns the current reading position, in bytes, from the
Expand Down

0 comments on commit 0ce7810

Please sign in to comment.