bugfix: properly range check texture coordinate indices
This commit is contained in:
parent
b1872c089e
commit
708e1b966b
2
wfobj.py
2
wfobj.py
@ -37,7 +37,7 @@ class WFObj(object):
|
||||
for vs in vrefs_split:
|
||||
if vs[0] < 1 or vs[0] > len(self.vertices):
|
||||
raise ValueError('Vertex index %d out of range on line %d' % (vs[0], lineno))
|
||||
if vs[1] < 0 or vs[0] > len(self.texcoords):
|
||||
if vs[1] < 0 or vs[1] > len(self.texcoords):
|
||||
raise ValueError('Texture coordinate index %d out of range on line %d' % (vs[1], lineno))
|
||||
if vs[2] < 0 or vs[2] > len(self.normals):
|
||||
raise ValueError('Normal index %d out of range on line %d' % (vs[2], lineno))
|
||||
|
Loading…
x
Reference in New Issue
Block a user