From ef18d2f4934a2879fec6ef14d1774736a8620375 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 29 Nov 2018 15:07:42 +0200 Subject: [PATCH] Fix ofstream API used to write an inserted image in the mobile app case Change-Id: I67f8a74376a46f0cfd01ee4236960b29d4bc6372 --- kit/ChildSession.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 056779a32..2af6b76c2 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -822,7 +822,7 @@ bool ChildSession::insertFile(const char* /*buffer*/, int /*length*/, const std: std::string tempFile = Util::createRandomTmpDir() + "/" + name; std::ofstream fileStream; fileStream.open(tempFile); - fileStream << binaryData.data(); + fileStream.write(reinterpret_cast(binaryData.data()), binaryData.size()); fileStream.close(); url = "file://" + tempFile; #endif