LibPDF: Check for end of stream in Reader::matches_regular_character()

The way this was set up before, this function would return "true" if
the underlying stream had ended, which would cause us to try to read
past the end in some edge cases.
This commit is contained in:
Julian Offenhäuser 2023-02-11 20:59:06 +01:00 committed by Linus Groh
parent a2b57dd188
commit 1f27c47973
Notes: sideshowbarker 2024-07-17 00:29:27 +09:00

View File

@ -34,7 +34,7 @@ bool Reader::matches_delimiter() const
bool Reader::matches_regular_character() const
{
return !matches_delimiter() && !matches_whitespace();
return !done() && !matches_delimiter() && !matches_whitespace();
}
bool Reader::consume_eol()