Material name corruption in tinyobj_parse_obj
PeterOGB opened this issue · comments
PeterOGB commented
When constructing a null terminated version of the material name, the last character is being overwritten due to wrong character index being used .
Line 1379:
material_name_null_term[commands[i].material_name_len-1] = 0;
should be
material_name_null_term[commands[i].material_name_len] = 0;
Syoyo Fujita commented
Good catch!
Your PR has been merged #35 , so I think this issue is ready to close.