From 6d6a243893532de40f636dbdc61d10c04ab019fb Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Wed, 17 Jan 2018 16:52:46 +0000 Subject: Pass ios_base::binary so WriteBitmapToPng works on Windows. Bug: pdfium:981 Change-Id: I87d750cd8de079dfc61923fee58af42518f5b6d1 Reviewed-on: https://pdfium-review.googlesource.com/23090 Reviewed-by: dsinclair Commit-Queue: Henrique Nakashima --- testing/embedder_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp index 09a8533902..b434353bd9 100644 --- a/testing/embedder_test.cpp +++ b/testing/embedder_test.cpp @@ -446,7 +446,7 @@ void EmbedderTest::WriteBitmapToPng(FPDF_BITMAP bitmap, ASSERT_LT(filename.size(), 256u); std::ofstream png_file; - png_file.open(filename); + png_file.open(filename, std::ios_base::out | std::ios_base::binary); png_file.write(reinterpret_cast(&png_encoding.front()), png_encoding.size()); ASSERT_TRUE(png_file.good()); -- cgit v1.2.3