1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

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

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()