Skip to content

Commit

Permalink
Update tinyobj_loader_c.h
Browse files Browse the repository at this point in the history
temporary quickfix for issue raysan5#3473
  • Loading branch information
SuperUserNameMan authored Oct 27, 2023
1 parent 2db7c72 commit 689baf0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/external/tinyobj_loader_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,11 @@ int tinyobj_parse_obj(tinyobj_attrib_t *attrib, tinyobj_shape_t **shapes,
if (is_line_ending(buf, i, end_idx)) {
line_infos[line_no].pos = prev_pos;
line_infos[line_no].len = i - prev_pos;

// ---- QUICK BUG FIX : https://github.com/raysan5/raylib/issues/3473
if ( i > 0 && buf[i-1] == '\r' ) line_infos[line_no].len--;
// --------

prev_pos = i + 1;
line_no++;
}
Expand Down

0 comments on commit 689baf0

Please sign in to comment.