diff --git a/code/Ply/PlyExporter.cpp b/code/Ply/PlyExporter.cpp index 5e21a88ac..a7498983b 100644 --- a/code/Ply/PlyExporter.cpp +++ b/code/Ply/PlyExporter.cpp @@ -373,10 +373,11 @@ void PlyExporter::WriteMeshIndices(const aiMesh* m, unsigned int offset) { for (unsigned int i = 0; i < m->mNumFaces; ++i) { const aiFace& f = m->mFaces[i]; - mOutput << f.mNumIndices << " "; + mOutput << f.mNumIndices; for(unsigned int c = 0; c < f.mNumIndices; ++c) { - mOutput << (f.mIndices[c] + offset) << (c == f.mNumIndices-1 ? endl : " "); + mOutput << " " << (f.mIndices[c] + offset); } + mOutput << endl; } }