summaryrefslogtreecommitdiff
path: root/modules/gltf
diff options
context:
space:
mode:
authorSarfraz <alamsarfraz422@gmail.com>2022-09-10 16:47:55 +0530
committerSarfraz <alamsarfraz422@gmail.com>2022-09-10 23:54:20 +0530
commit177f2a8419696925f3ad161ee66a8853a660cf5a (patch)
tree70a77fae0b50d90e37067a661dbc262772546823 /modules/gltf
parentce6f284e5ff16794658db4ccd265b9c71f6b62b2 (diff)
Fix gltf 8 bone weights condition to check for the second joint array
size.
Diffstat (limited to 'modules/gltf')
-rw-r--r--modules/gltf/gltf_document.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 6cb398b5f8..f5730e7137 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -2673,7 +2673,7 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
} else if (a.has("JOINTS_0") && a.has("JOINTS_1")) {
PackedInt32Array joints_0 = _decode_accessor_as_ints(state, a["JOINTS_0"], true);
PackedInt32Array joints_1 = _decode_accessor_as_ints(state, a["JOINTS_1"], true);
- ERR_FAIL_COND_V(joints_0.size() != joints_0.size(), ERR_INVALID_DATA);
+ ERR_FAIL_COND_V(joints_0.size() != joints_1.size(), ERR_INVALID_DATA);
int32_t weight_8_count = JOINT_GROUP_SIZE * 2;
Vector<int> joints;
joints.resize(vertex_num * weight_8_count);