From 4361262029b9891e487aa58645f9f06c9b5125a6 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 18 Jul 2017 17:02:21 +0200 Subject: [PATCH] PlyLoader: fix out of bound access. --- code/PlyLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/PlyLoader.cpp b/code/PlyLoader.cpp index 46def8c69..0e99df7a9 100644 --- a/code/PlyLoader.cpp +++ b/code/PlyLoader.cpp @@ -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]);