Merge pull request #91 from adishavit/develop

Changes the value indicating non-existent index to 0.
This commit is contained in:
Syoyo Fujita
2016-07-28 16:16:38 +09:00
committed by GitHub

View File

@@ -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
static vertex_index parseRawTriple(const char **token) {
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));
(*token) += strcspn((*token), "/ \t\r");