fix trailing space issue in tinyobjloader/mtl files.

This commit is contained in:
Erwin Coumans
2016-08-01 23:46:35 -07:00
parent b759ab8a91
commit a608f9bfdd

View File

@@ -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");