From 1835a6fb98286817cdf656f4d1e223bd85ee378f Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 7 Apr 2017 11:42:38 -0700 Subject: Tweak CFDF_Font::AppendChar() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass in/out argument as a pointer. Avoid pointless malloc just to copy in multibyte case. Then we can avoid special-casing the single-byte case. Change-Id: I3dd2d57e08ef6ad7b78ea38398b228fa41a9b3e6 Reviewed-on: https://pdfium-review.googlesource.com/3950 Reviewed-by: Nicolás Peña Commit-Queue: Tom Sepez --- core/fpdfdoc/cpvt_generateap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfdoc') diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp index 7e895e5850..bcd3aa1d00 100644 --- a/core/fpdfdoc/cpvt_generateap.cpp +++ b/core/fpdfdoc/cpvt_generateap.cpp @@ -1338,7 +1338,7 @@ CFX_ByteString CPVT_GenerateAP::GetPDFWordString(IPVT_FontMap* pFontMap, } else { uint32_t dwCharCode = pPDFFont->CharCodeFromUnicode(Word); if (dwCharCode != CPDF_Font::kInvalidCharCode) - pPDFFont->AppendChar(sWord, dwCharCode); + pPDFFont->AppendChar(&sWord, dwCharCode); } } return sWord; -- cgit v1.2.3