Changed Vertex to check for NULL

This commit is contained in:
2017-04-06 03:48:12 -07:00
parent 92914e0e5d
commit 4f13310893

View File

@ -190,7 +190,7 @@ EParserState CMapParser::ParseVertex(const std::string _Line)
pcToken = strtok_s(pcLine, kpcDelim, &pcContext);
Eigen::Vector3f Vert;
int iTokenNum = 0;
while(pcToken != nullptr)
while(pcToken != NULL)
{
if(std::isdigit(pcToken[0], std::locale()) || pcToken[0] == '-')
{
@ -214,9 +214,8 @@ EParserState CMapParser::ParseVertex(const std::string _Line)
return(PARSERSTATE_BRUSH);
}
pcToken = strtok_s(nullptr, kpcDelim, &pcContext);
pcToken = strtok_s(NULL, kpcDelim, &pcContext);
}
//this->m_WorldSpawn.m_Brushes[this->m_WorldSpawn.m_Brushes.size()-1].m_Vertices.push_back(Vert);
m_WorldSpawn.m_Brushes[m_WorldSpawn.m_Brushes.size()-1].m_Vertices.push_back(Vert);
return(PARSERSTATE_VERTEX);