Skip to content

Commit f751c37

Browse files
raysan5psxdev
authored andcommitted
Code format review
1 parent a76f747 commit f751c37

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/rmodels.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)