2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-03 19:00:51 +00:00

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.
This commit is contained in:
Jay Berkenbilt 2018-05-05 17:47:22 -04:00
parent b096e99649
commit 15ed9f8565

View File

@ -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();
}