aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFTokenizer.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-05-05 23:47:22 +0200
committerJay Berkenbilt <ejb@ql.org>2018-05-05 23:47:56 +0200
commit15ed9f85655113b2901a1e53f55554b503e230c6 (patch)
tree4c1a8e086e8d8586d91d81759f3f72aedfac4496 /libqpdf/QPDFTokenizer.cc
parentb096e9964975f8bf0017cb0db8a5db13053f2f16 (diff)
downloadqpdf-15ed9f85655113b2901a1e53f55554b503e230c6.tar.zst
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.
Diffstat (limited to 'libqpdf/QPDFTokenizer.cc')
-rw-r--r--libqpdf/QPDFTokenizer.cc2
1 files changed, 1 insertions, 1 deletions
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();
}