Commit 15ed9f85655113b2901a1e53f55554b503e230c6
1 parent
b096e996
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.
Showing
1 changed file
with
1 additions
and
1 deletions
libqpdf/QPDFTokenizer.cc
| ... | ... | @@ -49,7 +49,7 @@ QPDFTokenizer::Token::Token(token_type_e type, std::string const& value) : |
| 49 | 49 | { |
| 50 | 50 | raw_value = QPDFObjectHandle::newString(value).unparse(); |
| 51 | 51 | } |
| 52 | - else if (type == tt_string) | |
| 52 | + else if (type == tt_name) | |
| 53 | 53 | { |
| 54 | 54 | raw_value = QPDFObjectHandle::newName(value).unparse(); |
| 55 | 55 | } | ... | ... |