diff --git a/examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp b/examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp index 8479992d5..16b0522ea 100644 --- a/examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp +++ b/examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp @@ -366,6 +366,8 @@ std::string LoadMtl ( continue; } + linebuf = linebuf.substr(0, linebuf.find_last_not_of(" \t") + 1); + // Skip leading space. const char* token = linebuf.c_str(); token += strspn(token, " \t");