Fix out of bounds write
parent
68bc6a06b9
commit
f890bc791f
|
@ -243,9 +243,7 @@ void SMDImporter::CreateOutputMeshes() {
|
||||||
// collect all faces
|
// collect all faces
|
||||||
iNum = 0;
|
iNum = 0;
|
||||||
for (const auto &asTriangle : asTriangles) {
|
for (const auto &asTriangle : asTriangles) {
|
||||||
if (UINT_MAX == asTriangle.iTexture) {
|
if (asTriangle.iTexture >= aszTextures.size()) {
|
||||||
aaiFaces[asTriangle.iTexture].push_back( 0 );
|
|
||||||
} else if (asTriangle.iTexture >= aszTextures.size()) {
|
|
||||||
ASSIMP_LOG_INFO("[SMD/VTA] Material index overflow in face");
|
ASSIMP_LOG_INFO("[SMD/VTA] Material index overflow in face");
|
||||||
aaiFaces[asTriangle.iTexture].push_back((unsigned int)aszTextures.size()-1);
|
aaiFaces[asTriangle.iTexture].push_back((unsigned int)aszTextures.size()-1);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue