diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-02-28 22:20:45 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-03-05 19:35:46 +0100 |
commit | a51ae10b8ddada900c1abacd6284d35f6e65aa08 (patch) | |
tree | d49c868810ea244fe78228fbda180f776c238897 /libqpdf/QPDF_String.cc | |
parent | 66c3c8fdf7c60b34039bc9f70cd9bb00e0c0235d (diff) | |
download | qpdf-a51ae10b8ddada900c1abacd6284d35f6e65aa08.tar.zst |
Remove all calls to sprintf
Diffstat (limited to 'libqpdf/QPDF_String.cc')
-rw-r--r-- | libqpdf/QPDF_String.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/QPDF_String.cc b/libqpdf/QPDF_String.cc index b4d6b630..96736613 100644 --- a/libqpdf/QPDF_String.cc +++ b/libqpdf/QPDF_String.cc @@ -95,7 +95,6 @@ QPDF_String::unparse(bool force_binary) else { result += "("; - char num[5]; for (unsigned int i = 0; i < this->val.length(); ++i) { char ch = this->val[i]; @@ -140,8 +139,9 @@ QPDF_String::unparse(bool force_binary) } else { - sprintf(num, "\\%03o", static_cast<unsigned char>(ch)); // XXXX - result += num; + result += "\\" + QUtil::int_to_string_base( + static_cast<int>(static_cast<unsigned char>(ch)), + 8, 3); } break; } |