Skip to content

Commit

Permalink
Handle empty object parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Demers committed Apr 25, 2024
1 parent cdf089b commit 4fe0d12
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PdfSharpCore/Pdf.IO/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ public PdfObject ReadObject(PdfObject pdfObject, PdfObjectID objectID, bool incl
ParserDiagnostics.HandleUnexpectedToken(_lexer.Token);
break;

case Symbol.EndObj:
pdfObject = new PdfNullObject(_document);
pdfObject.SetObjectID(objectNumber, generationNumber);
return pdfObject;

default:
// Should not come here anymore.
ParserDiagnostics.HandleUnexpectedToken(_lexer.Token);
Expand Down

0 comments on commit 4fe0d12

Please sign in to comment.