From 60e8146b9fa5e1322b1a2b8e1368c91c5cacb62c Mon Sep 17 00:00:00 2001 From: Yingying Wang Date: Tue, 5 May 2020 12:51:40 -0700 Subject: [PATCH] fix wrong target idx when importing --- code/AssetLib/glTF2/glTF2Asset.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/glTF2/glTF2Asset.inl b/code/AssetLib/glTF2/glTF2Asset.inl index 0c99d059b..881fd4efc 100644 --- a/code/AssetLib/glTF2/glTF2Asset.inl +++ b/code/AssetLib/glTF2/glTF2Asset.inl @@ -1002,7 +1002,7 @@ inline void Mesh::Read(Value &pJSON_Object, Asset &pAsset_Root) { // Valid attribute semantics include POSITION, NORMAL, TANGENT int undPos = 0; Mesh::AccessorList *vec = 0; - if (GetAttribTargetVector(prim, i, attr, vec, undPos)) { + if (GetAttribTargetVector(prim, j, attr, vec, undPos)) { size_t idx = (attr[undPos] == '_') ? atoi(attr + undPos + 1) : 0; if ((*vec).size() <= idx) { (*vec).resize(idx + 1);