From 28f97ff783c16f3391384ce97b765ce4eb310ac7 Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 4 Apr 2016 16:41:35 -0700 Subject: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. Having this happen implicitly can be dangerous because the lifetime has to be considered; we should have caught the "red bots" in https://codereview.chromium.org/1847333004/#ps60001 at compile time. Review URL: https://codereview.chromium.org/1853233002 --- fpdfsdk/fpdf_ext.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/fpdf_ext.cpp') diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp index 484993c6a1..a1009c5cdf 100644 --- a/fpdfsdk/fpdf_ext.cpp +++ b/fpdfsdk/fpdf_ext.cpp @@ -104,10 +104,11 @@ FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) { pElement->GetAttrByIndex(i, space, name, value); if (space == "xmlns" && name == "adhocwf" && value == L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") { - CXML_Element* pVersion = pElement->GetElement("adhocwf", cbName); + CXML_Element* pVersion = + pElement->GetElement("adhocwf", cbName.AsByteStringC()); if (!pVersion) continue; - CFX_WideString wsContent = pVersion->GetContent(0); // == 1.1 + CFX_WideString wsContent = pVersion->GetContent(0); int nType = wsContent.GetInteger(); switch (nType) { case 1: -- cgit v1.2.3