glTFImporter: avoid out-of-bounds-access.

pull/996/head
Kim Kulling 2016-08-29 20:05:29 +02:00
parent 147921ac39
commit c6f670ff50
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ void glTFImporter::ImportMeshes(glTF::Asset& r)
attr.normal[0]->ExtractData(aim->mNormals);
}
for (size_t tc = 0; tc < attr.texcoord.size() && tc <= AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) {
for (size_t tc = 0; tc < attr.texcoord.size() && tc < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) {
attr.texcoord[tc]->ExtractData(aim->mTextureCoords[tc]);
aim->mNumUVComponents[tc] = attr.texcoord[tc]->GetNumComponents();