From 4f133108938ceda6642aaac14ac4920fcb3ebd23 Mon Sep 17 00:00:00 2001 From: <> Date: Thu, 6 Apr 2017 03:48:12 -0700 Subject: [PATCH] Changed Vertex to check for NULL --- ReflexToQ3/includes/v8mapparser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ReflexToQ3/includes/v8mapparser.cpp b/ReflexToQ3/includes/v8mapparser.cpp index d1246f8..d6d26f7 100644 --- a/ReflexToQ3/includes/v8mapparser.cpp +++ b/ReflexToQ3/includes/v8mapparser.cpp @@ -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);