bugfix: properly range check texture coordinate indices

This commit is contained in:
Josh Holtrop 2012-07-15 18:59:58 -04:00
parent b1872c089e
commit 708e1b966b

View File

@ -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))