PlyLoader: fix out of bound access.

pull/1352/head
Kim Kulling 2017-07-18 17:02:21 +02:00
parent 3346fb517f
commit 4361262029
1 changed files with 1 additions and 1 deletions

View File

@ -761,7 +761,7 @@ void PLYImporter::LoadFace(const PLY::Element* pcElement, const PLY::ElementInst
mGeneratedMesh->mFaces[pos].mIndices = new unsigned int[3];
mGeneratedMesh->mFaces[pos].mIndices[0] = aiTable[0];
mGeneratedMesh->mFaces[pos].mIndices[1] = aiTable[1];
mGeneratedMesh->mFaces[pos].mIndices[2] = aiTable[2];
mGeneratedMesh->mFaces[pos].mIndices[2] = p;
if ((flip = !flip)) {
std::swap(mGeneratedMesh->mFaces[pos].mIndices[0], mGeneratedMesh->mFaces[pos].mIndices[1]);