OM Writer: Added Mark to the format header to identify end of stream correctly (Thanks to Jamie Kydd for the patch)

This commit is contained in:
Jan Möbius
2016-12-27 08:10:10 +01:00
parent 00a95438f7
commit da1ec03c6e
4 changed files with 10 additions and 1 deletions

View File

@@ -430,6 +430,11 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
OMFormat::Chunk::Entity_Mesh, swap );
}
memset(&chunk_header, 0, sizeof(chunk_header));
chunk_header.name_ = false;
chunk_header.entity_ = OMFormat::Chunk::Entity_Sentinel;
bytes += store(_os, chunk_header, swap);
std::clog << "#bytes written: " << bytes << std::endl;
return true;