@@ -519,6 +519,8 @@ PDFErrorOr<Vector<Operator>> Parser::parse_operators()
while (!m_reader.done()) {
parse_comment();
+ if (m_reader.done())
+ break;
auto ch = m_reader.peek();
if (is_operator_char_start(ch)) {
auto operator_start = m_reader.offset();