Skip to content

Commit

Permalink
Merge pull request #439 from NicolaDemers/master
Browse files Browse the repository at this point in the history
Handle empty object parsing
  • Loading branch information
ststeiger authored Jul 12, 2024
2 parents c771d63 + 4fe0d12 commit 2a9c0f4
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 2a9c0f4

Please sign in to comment.