Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02df494

Browse files
committed
Fix assert equation.
1 parent 1a7bdc6 commit 02df494

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

experimental/viewer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ bool LoadObjAndConvert(float bmin[3], float bmax[3], const char* filename, int n
357357
std::vector<float> vb; // pos(3float), normal(3float), color(3float)
358358
size_t face_offset = 0;
359359
for (size_t v = 0; v < attrib.face_num_verts.size(); v++) {
360-
assert(attrib.face_num_verts[v] % 3 == 0); // assume all triangle face.
360+
assert(attrib.face_num_verts[v] == 3); // assume all triangle face.
361361
for (size_t f = 0; f < attrib.face_num_verts[v] / 3; f++) {
362362
tinyobj_opt::index_t idx0 = attrib.indices[face_offset+3*f+0];
363363
tinyobj_opt::index_t idx1 = attrib.indices[face_offset+3*f+1];

0 commit comments

Comments
 (0)