aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--experimental/tinyobj_loader_opt.h2
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;