summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_pagelabel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_pagelabel.cpp')
-rw-r--r--core/fpdfdoc/cpdf_pagelabel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfdoc/cpdf_pagelabel.cpp b/core/fpdfdoc/cpdf_pagelabel.cpp
index 3892abad5e..41cbb8974e 100644
--- a/core/fpdfdoc/cpdf_pagelabel.cpp
+++ b/core/fpdfdoc/cpdf_pagelabel.cpp
@@ -142,5 +142,7 @@ int32_t CPDF_PageLabel::GetPageByLabel(const CFX_ByteStringC& bsLabel) const {
}
int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const {
- return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsStringC());
+ // TODO(tsepez): check usage of c_str() below.
+ return GetPageByLabel(
+ PDF_EncodeText(wsLabel.unterminated_c_str()).AsStringC());
}