From b46505b13d4a85e26d1d5b6f9fc2a4264bf8b02f Mon Sep 17 00:00:00 2001 From: SuperUserNameMan Date: Fri, 27 Oct 2023 17:13:10 +0200 Subject: [PATCH] Update tinyobj_loader_c.h (#3474) temporary quickfix for issue #3473 --- src/external/tinyobj_loader_c.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/external/tinyobj_loader_c.h b/src/external/tinyobj_loader_c.h index 502a55a7e369..55d595a69433 100644 --- a/src/external/tinyobj_loader_c.h +++ b/src/external/tinyobj_loader_c.h @@ -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++; }