mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 15:17:29 +00:00
Replace strchr in QPDF_Name::normalizeName
This commit is contained in:
parent
3ee552fec5
commit
deb1c33086
@ -37,7 +37,10 @@ QPDF_Name::normalizeName(std::string const& name)
|
||||
// QPDFTokenizer embeds a null character to encode an
|
||||
// invalid #.
|
||||
result += "#";
|
||||
} else if (strchr("#()<>[]{}/%", ch) || (ch < 33) || (ch > 126)) {
|
||||
} else if (
|
||||
ch < 33 || ch == '/' || ch == '(' || ch == ')' || ch == '{' ||
|
||||
ch == '}' || ch == '<' || ch == '>' || ch == '[' || ch == ']' ||
|
||||
ch == '%' || ch > 126) {
|
||||
result += QUtil::hex_encode_char(ch);
|
||||
} else {
|
||||
result += ch;
|
||||
|
Loading…
Reference in New Issue
Block a user