summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/fpdf_parser_utility.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/fpdf_parser_utility.cpp')
-rw-r--r--core/fpdfapi/parser/fpdf_parser_utility.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/fpdf_parser_utility.cpp b/core/fpdfapi/parser/fpdf_parser_utility.cpp
index 1edf577c5b..af109e35aa 100644
--- a/core/fpdfapi/parser/fpdf_parser_utility.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_utility.cpp
@@ -139,8 +139,8 @@ CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig) {
if (ch >= 0x80 || PDFCharIsWhitespace(ch) || ch == '#' ||
PDFCharIsDelimiter(ch)) {
dest_buf[dest_len++] = '#';
- dest_buf[dest_len++] = "0123456789ABCDEF"[ch / 16];
- dest_buf[dest_len++] = "0123456789ABCDEF"[ch % 16];
+ FXSYS_IntToTwoHexChars(ch, dest_buf + dest_len);
+ dest_len += 2;
} else {
dest_buf[dest_len++] = ch;
}