Fix crash in parsing solution/project

This commit is contained in:
amai2012 2016-08-24 12:17:54 +02:00
parent c0401c2ef5
commit 7cc2124176
1 changed files with 12 additions and 8 deletions

View File

@ -214,12 +214,14 @@ namespace {
if (a)
name = a;
for (const tinyxml2::XMLElement *e = cfg->FirstChildElement(); e; e = e->NextSiblingElement()) {
if (e->GetText()) {
if (std::strcmp(e->Name(),"Configuration")==0)
configuration = e->GetText();
else if (std::strcmp(e->Name(),"Platform")==0)
platform = e->GetText();
}
}
}
std::string name;
std::string configuration;
std::string platform;
@ -234,6 +236,7 @@ namespace {
if (std::strcmp(e1->Name(), "ClCompile") != 0)
continue;
for (const tinyxml2::XMLElement *e = e1->FirstChildElement(); e; e = e->NextSiblingElement()) {
if (e->GetText()) {
if (std::strcmp(e->Name(), "PreprocessorDefinitions") == 0)
preprocessorDefinitions = e->GetText();
else if (std::strcmp(e->Name(), "AdditionalIncludeDirectories") == 0)
@ -241,6 +244,7 @@ namespace {
}
}
}
}
static void replaceAll(std::string &c, const std::string &from, const std::string &to) {
std::string::size_type pos;