aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-22 14:40:49 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-22 14:40:49 +0100
commit56b4d5a6108f9b633d890e7cdc2d769128479651 (patch)
tree6509e14537285c5666d0d55ba87536c0d36f9fe9 /libqpdf
parentf7ac5915909c7197acf84265f8d8ad41b95a36a8 (diff)
downloadqpdf-56b4d5a6108f9b633d890e7cdc2d769128479651.tar.zst
Use val.at instead of val[]
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/QPDF_String.cc6
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.