Fix OBJ parser mtllib statement parsing bug.
Since `getName` returns the whole line (including spaces) parse out the first word for comparison.pull/1040/head
parent
5cd16a0aa6
commit
4b15dfd9af
|
@ -182,9 +182,10 @@ void ObjFileParser::parseFile()
|
||||||
|
|
||||||
case 'm': // Parse a material library or merging group ('mg')
|
case 'm': // Parse a material library or merging group ('mg')
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
||||||
getName(m_DataIt, m_DataItEnd, name);
|
getName(m_DataIt, m_DataItEnd, name);
|
||||||
|
name = name.substr(0, name.find(" "));
|
||||||
if (name == "mg")
|
if (name == "mg")
|
||||||
getGroupNumberAndResolution();
|
getGroupNumberAndResolution();
|
||||||
else if(name == "mtllib")
|
else if(name == "mtllib")
|
||||||
|
|
Loading…
Reference in New Issue