Merge pull request #91 from adishavit/develop
Changes the value indicating non-existent index to 0.
This commit is contained in:
@@ -536,7 +536,7 @@ static vertex_index parseTriple(const char **token, int vsize, int vnsize,
|
|||||||
// Parse raw triples: i, i/j/k, i//k, i/j
|
// Parse raw triples: i, i/j/k, i//k, i/j
|
||||||
static vertex_index parseRawTriple(const char **token) {
|
static vertex_index parseRawTriple(const char **token) {
|
||||||
vertex_index vi(
|
vertex_index vi(
|
||||||
static_cast<int>(0x80000000)); // 0x80000000 = -2147483648 = invalid
|
static_cast<int>(0)); // 0 is an invalid index in OBJ
|
||||||
|
|
||||||
vi.v_idx = atoi((*token));
|
vi.v_idx = atoi((*token));
|
||||||
(*token) += strcspn((*token), "/ \t\r");
|
(*token) += strcspn((*token), "/ \t\r");
|
||||||
|
|||||||
Reference in New Issue
Block a user