From 15ed9f85655113b2901a1e53f55554b503e230c6 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 5 May 2018 17:47:22 -0400 Subject: [PATCH] Fix small logic error in Token construct (fixes #206) The special case around name token was not reachable. This would only affect constructors of name tokens that were represented in non-canonical form such as with a hex substitution for a printable character. The error was harmless but still a bug. --- libqpdf/QPDFTokenizer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libqpdf/QPDFTokenizer.cc b/libqpdf/QPDFTokenizer.cc index 95551e7c..9c2a1e05 100644 --- a/libqpdf/QPDFTokenizer.cc +++ b/libqpdf/QPDFTokenizer.cc @@ -49,7 +49,7 @@ QPDFTokenizer::Token::Token(token_type_e type, std::string const& value) : { raw_value = QPDFObjectHandle::newString(value).unparse(); } - else if (type == tt_string) + else if (type == tt_name) { raw_value = QPDFObjectHandle::newName(value).unparse(); }