summaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Name.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-01-04 12:17:01 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2023-01-07 00:42:12 +0100
commit942a2c3f689b46107538d49a67dbf74c76e672b8 (patch)
treead5b7294b726e99b14570dad8eb0414924728e20 /libqpdf/QPDF_Name.cc
parent1326ff7f79a199ce7e9bbecb1a3dab5580d20815 (diff)
downloadqpdf-942a2c3f689b46107538d49a67dbf74c76e672b8.tar.zst
Add new function QUtil::hex_encode_char
Diffstat (limited to 'libqpdf/QPDF_Name.cc')
-rw-r--r--libqpdf/QPDF_Name.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libqpdf/QPDF_Name.cc b/libqpdf/QPDF_Name.cc
index 353cf311..1587bcf4 100644
--- a/libqpdf/QPDF_Name.cc
+++ b/libqpdf/QPDF_Name.cc
@@ -38,7 +38,7 @@ QPDF_Name::normalizeName(std::string const& name)
// invalid #.
result += "#";
} else if (strchr("#()<>[]{}/%", ch) || (ch < 33) || (ch > 126)) {
- result += "#" + QUtil::hex_encode(std::string(&ch, 1));
+ result += QUtil::hex_encode_char(ch);
} else {
result += ch;
}