summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-11-27 19:30:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-27 19:30:17 +0000
commit3fc7fe5e4d8fa257e35e6ae86fc6cf4d6b5016a2 (patch)
treee7bb4942e6feaf5885d62e8c9de6c6363994beab /core
parentb388961f8e009e9c3c6c77588057e71caf7eafa9 (diff)
downloadpdfium-3fc7fe5e4d8fa257e35e6ae86fc6cf4d6b5016a2.tar.xz
Change FPDF_GetText to return "" when asked to get 0 characters
BUG=chromium:788103 Change-Id: I8ebdbc78eb14c358d7ac019b96de4828e6071b79 Reviewed-on: https://pdfium-review.googlesource.com/19350 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fxcrt/widestring.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fxcrt/widestring.h b/core/fxcrt/widestring.h
index f48c32379a..14621ec1a1 100644
--- a/core/fxcrt/widestring.h
+++ b/core/fxcrt/widestring.h
@@ -182,6 +182,10 @@ class WideString {
size_t Remove(wchar_t ch);
ByteString UTF8Encode() const;
+
+ // This method will add \0\0 to the end of the string to represent the
+ // wide string terminator. These values are in the string, not just the data,
+ // so GetLength() will include them.
ByteString UTF16LE_Encode() const;
protected: