summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testing/embedder_test.cpp2
1 files changed, 1 insertions, 1 deletions
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<char*>(&png_encoding.front()),
png_encoding.size());
ASSERT_TRUE(png_file.good());