Browse Source

REVIEWED: tinyobjloader #1568

pull/1695/head
raysan5 3 years ago
parent
commit
6a24dd8945
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/external/tinyobj_loader_c.h

+ 1
- 1
src/external/tinyobj_loader_c.h View File

@ -1377,7 +1377,7 @@ int tinyobj_parse_obj(tinyobj_attrib_t *attrib, tinyobj_shape_t **shapes,
/* Create a null terminated string */
char* material_name_null_term = (char*) TINYOBJ_MALLOC(commands[i].material_name_len + 1);
memcpy((void*) material_name_null_term, (const void*) commands[i].material_name, commands[i].material_name_len);
material_name_null_term[commands[i].material_name_len - 1] = 0;
material_name_null_term[commands[i].material_name_len] = 0;
if (hash_table_exists(material_name_null_term, &material_table))
material_id = (int)hash_table_get(material_name_null_term, &material_table);

Loading…
Cancel
Save