File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4544,7 +4544,7 @@ static Model LoadOBJ(const char *fileName)
45444544
45454545 for (int i = 0 ; i < 3 ; i ++ ) model .meshes [meshIndex ].vertices [localMeshVertexCount * 3 + i ] = objAttributes .vertices [vertIndex * 3 + i ];
45464546
4547- if (objAttributes .texcoords != NULL && texcordIndex != TINYOBJ_INVALID_INDEX && texcordIndex >= 0 )
4547+ if (( objAttributes .texcoords != NULL ) && ( texcordIndex != TINYOBJ_INVALID_INDEX ) && ( texcordIndex >= 0 ) )
45484548 {
45494549 for (int i = 0 ; i < 2 ; i ++ ) model .meshes [meshIndex ].texcoords [localMeshVertexCount * 2 + i ] = objAttributes .texcoords [texcordIndex * 2 + i ];
45504550 model .meshes [meshIndex ].texcoords [localMeshVertexCount * 2 + 1 ] = 1.0f - model .meshes [meshIndex ].texcoords [localMeshVertexCount * 2 + 1 ];
@@ -4555,7 +4555,7 @@ static Model LoadOBJ(const char *fileName)
45554555 model .meshes [meshIndex ].texcoords [localMeshVertexCount * 2 + 1 ] = 0.0f ;
45564556 }
45574557
4558- if (objAttributes .normals != NULL && normalIndex != TINYOBJ_INVALID_INDEX && normalIndex >= 0 )
4558+ if (( objAttributes .normals != NULL ) && ( normalIndex != TINYOBJ_INVALID_INDEX ) && ( normalIndex >= 0 ) )
45594559 {
45604560 for (int i = 0 ; i < 3 ; i ++ ) model .meshes [meshIndex ].normals [localMeshVertexCount * 3 + i ] = objAttributes .normals [normalIndex * 3 + i ];
45614561 }
You can’t perform that action at this time.
0 commit comments