File 0001-ASE-Use-correct-vertex-container.patch of Package assimp.18846
From 69cc9ae6f541e3e44743bbbf3343d3edbff038e1 Mon Sep 17 00:00:00 2001
From: Kim Kulling <kimkulling@users.noreply.github.com>
Date: Thu, 13 Mar 2025 16:23:36 +0100
Subject: [PATCH] ASE: Use correct vertex container (#6051)
- closes https://github.com/assimp/assimp/issues/6024
---
code/AssetLib/ASE/ASEParser.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/AssetLib/ASE/ASEParser.cpp b/code/AssetLib/ASE/ASEParser.cpp
index c43eb42..e870dbb 100644
--- a/code/AssetLib/ASE/ASEParser.cpp
+++ b/code/AssetLib/ASE/ASEParser.cpp
@@ -1382,8 +1382,8 @@ void Parser::ParseLV4MeshBonesVertices(unsigned int iNumVertices, ASE::Mesh &mes
if (TokenMatch(filePtr, "MESH_BONE_VERTEX", 16)) {
// read the vertex index
unsigned int iIndex = strtoul10(filePtr, &filePtr);
- 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");
}
--
2.49.0