Corrected a small bug in the management of negative indexes of obj on non triangular faces
This commit is contained in:
parent
e5857b7925
commit
bd784fabaa
|
|
@ -447,6 +447,8 @@ static int Open( OpenMeshType &m, const char * filename, Info &oi)
|
|||
int vn4_index;
|
||||
|
||||
SplitToken(tokens[++iVertex], v4_index, vn4_index, vt4_index, oi.mask);
|
||||
if(!GoodObjIndex(v4_index, numVertices))
|
||||
return E_BAD_VERT_INDEX;
|
||||
|
||||
// assigning wedge texture coordinates
|
||||
// -----------------------------------
|
||||
|
|
@ -454,8 +456,6 @@ static int Open( OpenMeshType &m, const char * filename, Info &oi)
|
|||
{
|
||||
// verifying validity of texture coords index
|
||||
// ------------------------------------------
|
||||
if(!GoodObjIndex(v4_index, numVertices))
|
||||
return E_BAD_VERT_INDEX;
|
||||
if(!GoodObjIndex(vt4_index,oi.numTexCoords))
|
||||
return E_BAD_VERT_TEX_INDEX;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue