From 41066c1ecaafd99904b160211985b56cce195ee8 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 18 May 2017 09:28:49 -0700 Subject: Bad cast to CPDF_Document in FPDFEditEmbeddertest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test, as written, is only correct for the non-xfa case, where the FPDF_Document opaque type is equivalent to the CPDF_Document. Under XFA, however, there is another layer of indirection that the test harness needs to respect. Sorry, I missed this the first time around when I signed off on the CL that introduced this test. Change-Id: Ida3579edf639fbfca2939dc151c0420247e90ab3 Reviewed-on: https://pdfium-review.googlesource.com/5657 Reviewed-by: Nicolás Peña Commit-Queue: Tom Sepez --- fpdfsdk/fpdfedit_embeddertest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp index 4559ee3f19..b10dacfc98 100644 --- a/fpdfsdk/fpdfedit_embeddertest.cpp +++ b/fpdfsdk/fpdfedit_embeddertest.cpp @@ -26,7 +26,7 @@ class FPDFEditEmbeddertest : public EmbedderTest, public TestSaver { protected: FPDF_DOCUMENT CreateNewDocument() { document_ = FPDF_CreateNewDocument(); - cpdf_doc_ = static_cast(document_); + cpdf_doc_ = CPDFDocumentFromFPDFDocument(document_); return document_; } -- cgit v1.2.3