diff options
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r-- | core/fpdfdoc/cpdf_pagelabel.cpp | 4 |
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()); } |