Merge branch 'master' of github.com:syoyo/tinygltf

This commit is contained in:
Syoyo Fujita 2020-07-14 22:05:28 +09:00
commit 50ae8a31a8

View File

@ -5709,10 +5709,12 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
for (auto &target : primitive.targets) {
for (auto &attribute : target) {
model
->bufferViews[size_t(
model->accessors[size_t(attribute.second)].bufferView)]
.target = TINYGLTF_TARGET_ARRAY_BUFFER;
auto bufferView =
model->accessors[size_t(attribute.second)].bufferView;
if (bufferView > 0) {
model->bufferViews[size_t(bufferView)].target =
TINYGLTF_TARGET_ARRAY_BUFFER;
}
}
}
}