From 708e1b966b1a29c1defad489c8d6f92c87dfcf22 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 15 Jul 2012 18:59:58 -0400 Subject: [PATCH] bugfix: properly range check texture coordinate indices --- wfobj.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfobj.py b/wfobj.py index df5079c..6e90984 100755 --- a/wfobj.py +++ b/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))