mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-01 07:35:02 +03:00
LibPDF: Tolerate comment after last dict item
Necessary to be able to open https://github.com/pdf-association/pdf20examples/blob/master/pdf20-utf8-test.pdf
This commit is contained in:
parent
7ca4e4a967
commit
9e8cf4fc1a
Notes:
sideshowbarker
2024-07-17 00:23:42 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/9e8cf4fc1a Pull-request: https://github.com/SerenityOS/serenity/pull/22018
@ -425,9 +425,9 @@ PDFErrorOr<NonnullRefPtr<DictObject>> Parser::parse_dict()
|
||||
HashMap<DeprecatedFlyString, Value> map;
|
||||
|
||||
while (!m_reader.done()) {
|
||||
parse_comment();
|
||||
if (m_reader.matches(">>"))
|
||||
break;
|
||||
parse_comment();
|
||||
auto name = TRY(parse_name())->name();
|
||||
auto value = TRY(parse_value());
|
||||
map.set(name, value);
|
||||
|
Loading…
Reference in New Issue
Block a user