diff options
author | Syoyo Fujita <syoyo@lighttransport.com> | 2017-07-10 01:41:39 +0900 |
---|---|---|
committer | Syoyo Fujita <syoyo@lighttransport.com> | 2017-07-10 01:41:39 +0900 |
commit | 8e7da8285275d41ebca3f9e747d5129a12b22d88 (patch) | |
tree | f4e48c611492d5933859ddefd8b55281537298ba | |
parent | 6cde18eb555696b909ae53ab3d7d4e29fe2dd397 (diff) | |
download | tinyobjloader-8e7da8285275d41ebca3f9e747d5129a12b22d88.tar.gz |
Fix index calculation.
-rw-r--r-- | experimental/tinyobj_loader_opt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/experimental/tinyobj_loader_opt.h b/experimental/tinyobj_loader_opt.h index ed44b47..f86b482 100644 --- a/experimental/tinyobj_loader_opt.h +++ b/experimental/tinyobj_loader_opt.h @@ -1331,7 +1331,7 @@ bool parseObj(attrib_t *attrib, std::vector<shape_t> *shapes, // Find extra line which spand across chunk boundary. if ((t < num_threads) && (buf[end_idx - 1] != '\n')) { - auto extra_span_idx = (std::min)(end_idx - 1 + chunk_size, len - 1); + auto extra_span_idx = (std::min)(end_idx - 1 + chunk_size, len); for (size_t i = end_idx; i < extra_span_idx; i++) { if (is_line_ending(buf, i, extra_span_idx)) { LineInfo info; |