From 3fc7fe5e4d8fa257e35e6ae86fc6cf4d6b5016a2 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 27 Nov 2017 19:30:17 +0000 Subject: 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 Reviewed-by: dsinclair --- core/fxcrt/widestring.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core') 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: -- cgit v1.2.3