summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfdoc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdfdoc.cpp')
-rw-r--r--fpdfsdk/src/fpdfdoc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp
index edd61f9e51..e974ffbcf2 100644
--- a/fpdfsdk/src/fpdfdoc.cpp
+++ b/fpdfsdk/src/fpdfdoc.cpp
@@ -36,7 +36,8 @@ DLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_Find(FPDF_DOCUMENT document, FPDF_W
CPDF_Document* pDoc = (CPDF_Document*)document;
CPDF_BookmarkTree tree(pDoc);
- CFX_WideString wstr = CFX_WideString::FromUTF16LE(title);
+ FX_STRSIZE len = CFX_WideString::WStringLength(title);
+ CFX_WideString wstr = CFX_WideString::FromUTF16LE(title, len);
return FindBookmark(tree, NULL, wstr);
}