From 2874022aa4cdd20b8aa9e7e7d2729e6b217544a2 Mon Sep 17 00:00:00 2001 From: Michael R Sweet <msweet@msweet.org> Date: Fri, 4 Apr 2025 18:26:35 -0400 Subject: [PATCH] Allow empty name tokens (Issue #116) --- CHANGES.md | 7 +++++++ pdfio-token.c | 9 +-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ed519b9..5f63762 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,13 @@ Changes in PDFio ================ + +v1.5.2 - YYYY-MM-DD +------------------- + +- Fixed support for empty name values (Issue #116) + + v1.5.1 - 2025-03-28 ------------------- diff --git a/pdfio-token.c b/pdfio-token.c index 65ed81b..70115c9 100644 --- a/pdfio-token.c +++ b/pdfio-token.c @@ -1,7 +1,7 @@ // // PDF token parsing functions for PDFio. // -// Copyright © 2021-2023 by Michael R Sweet. +// Copyright © 2021-2025 by Michael R Sweet. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. @@ -528,13 +528,6 @@ _pdfioTokenRead(_pdfio_token_t *tb, // I - Token buffer/stack return (false); } } - - if (bufptr == (buffer + 1)) - { - _pdfioFileError(tb->pdf, "Empty name."); - *bufptr = '\0'; - return (false); - } break; case '<' : // Potential hex string