diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-02-22 14:40:49 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-02-22 14:40:49 +0100 |
commit | 56b4d5a6108f9b633d890e7cdc2d769128479651 (patch) | |
tree | 6509e14537285c5666d0d55ba87536c0d36f9fe9 | |
parent | f7ac5915909c7197acf84265f8d8ad41b95a36a8 (diff) | |
download | qpdf-56b4d5a6108f9b633d890e7cdc2d769128479651.tar.zst |
Use val.at instead of val[]
-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 931ccd61..5604ff10 100644 --- a/libqpdf/QPDF_String.cc +++ b/libqpdf/QPDF_String.cc @@ -184,9 +184,9 @@ QPDF_String::getUTF8Val() const return QUtil::utf16_to_utf8(this->val); } else if ((val.length() >= 3) && - (val[0] == '\xEF') && - (val[1] == '\xBB') && - (val[2] == '\xBF')) + (val.at(0) == '\xEF') && + (val.at(1) == '\xBB') && + (val.at(2) == '\xBF')) { // PDF 2.0 allows UTF-8 strings when explicitly prefixed with // the above bytes, which is just UTF-8 encoding of U+FEFF. |