From 0fe8e739c3fcfbf690821145498e9bbaeb24a519 Mon Sep 17 00:00:00 2001 From: Alexander Gessler Date: Tue, 12 May 2015 21:51:27 +0200 Subject: [PATCH] Use "wb" when writing binary STL exports, fixes #556. --- code/STLExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/STLExporter.cpp b/code/STLExporter.cpp index 1bc631ef7..13684fecc 100644 --- a/code/STLExporter.cpp +++ b/code/STLExporter.cpp @@ -75,7 +75,7 @@ void ExportSceneSTLBinary(const char* pFile,IOSystem* pIOSystem, const aiScene* STLExporter exporter(pFile, pScene, true); // we're still here - export successfully completed. Write the file. - boost::scoped_ptr outfile (pIOSystem->Open(pFile,"wt")); + boost::scoped_ptr outfile (pIOSystem->Open(pFile,"wb")); if(outfile == NULL) { throw DeadlyExportError("could not open output .stl file: " + std::string(pFile)); }