mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 04:36:03 +08:00
Fix inequality. Should allow 0 for bufferView.
This commit is contained in:
parent
50ae8a31a8
commit
91da299729
@ -5711,7 +5711,8 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
|
|||||||
for (auto &attribute : target) {
|
for (auto &attribute : target) {
|
||||||
auto bufferView =
|
auto bufferView =
|
||||||
model->accessors[size_t(attribute.second)].bufferView;
|
model->accessors[size_t(attribute.second)].bufferView;
|
||||||
if (bufferView > 0) {
|
// bufferView could be null(-1) for sparse morph target
|
||||||
|
if (bufferView >= 0) {
|
||||||
model->bufferViews[size_t(bufferView)].target =
|
model->bufferViews[size_t(bufferView)].target =
|
||||||
TINYGLTF_TARGET_ARRAY_BUFFER;
|
TINYGLTF_TARGET_ARRAY_BUFFER;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user