Fix index calculation.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user