ASE: Use correct vertex container (#6051)

- closes https://github.com/assimp/assimp/issues/6024
This commit is contained in:
Kim Kulling
2025-03-13 16:23:36 +01:00
committed by GitHub
parent 2194944a25
commit e8a6286542

View File

@@ -1406,8 +1406,8 @@ void Parser::ParseLV4MeshBonesVertices(unsigned int iNumVertices, ASE::Mesh &mes
if (TokenMatch(mFilePtr, "MESH_BONE_VERTEX", 16)) {
// read the vertex index
unsigned int iIndex = strtoul10(mFilePtr, &mFilePtr);
if (iIndex >= mesh.mPositions.size()) {
iIndex = (unsigned int)mesh.mPositions.size() - 1;
if (iIndex >= mesh.mBoneVertices.size()) {
iIndex = (unsigned int)mesh.mBoneVertices.size() - 1;
LogWarning("Bone vertex index is out of bounds. Using the largest valid "
"bone vertex index instead");
}