Skip to content

Commit 8e7da82

Browse files
committed
Fix index calculation.
1 parent 6cde18e commit 8e7da82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

experimental/tinyobj_loader_opt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ bool parseObj(attrib_t *attrib, std::vector<shape_t> *shapes,
13311331

13321332
// Find extra line which spand across chunk boundary.
13331333
if ((t < num_threads) && (buf[end_idx - 1] != '\n')) {
1334-
auto extra_span_idx = (std::min)(end_idx - 1 + chunk_size, len - 1);
1334+
auto extra_span_idx = (std::min)(end_idx - 1 + chunk_size, len);
13351335
for (size_t i = end_idx; i < extra_span_idx; i++) {
13361336
if (is_line_ending(buf, i, extra_span_idx)) {
13371337
LineInfo info;

0 commit comments

Comments
 (0)