Trim trailing whitespaces from mtllib definitions

This commit is contained in:
Mario Döring 2022-08-31 21:21:50 +02:00 committed by GitHub
parent 85778da5fc
commit 71e8a6a361
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1198,6 +1198,10 @@ const char* parse_mtllib(fastObjData* data, const char* ptr, const fastObjCallba
e = ptr;
lib = string_concat(data->base, s, e);
while (lib[strlen(lib) - 1] == ' ')
lib[strlen(lib) - 1] = '\0';
if (lib)
{
string_fix_separators(lib);