fix wrong target idx when importing

pull/3207/head
Yingying Wang 2020-05-05 12:51:40 -07:00
parent cacc7c1b27
commit 60e8146b9f
1 changed files with 1 additions and 1 deletions

View File

@ -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);