fix index comparison wrt array size
This commit is contained in:
@@ -2161,9 +2161,9 @@ bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes,
|
|||||||
// Ignore unknown command.
|
// Ignore unknown command.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (greatest_vertex_index >= v.size()
|
if (greatest_vertex_index * 3 >= int(v.size())
|
||||||
|| greatest_normal_index >= vn.size()
|
|| greatest_normal_index * 3 >= int(vn.size())
|
||||||
|| greatest_texcoord_index >= vt.size())
|
|| greatest_texcoord_index * 2 >= int(vt.size()))
|
||||||
{
|
{
|
||||||
if (err) {
|
if (err) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|||||||
Reference in New Issue
Block a user