summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index d6f8d6b..7dd6121 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -367,13 +367,17 @@ bool cmSystemTools::IsInternallyOn(const char* val)
return false;
}
std::basic_string<char> v = val;
+ if (v.size() > 4)
+ {
+ return false;
+ }
for(std::basic_string<char>::iterator c = v.begin();
c != v.end(); c++)
{
*c = static_cast<char>(toupper(*c));
}
- return (v == "I_ON" || v == "i_on");
+ return v == "I_ON";
}
bool cmSystemTools::IsOn(const char* val)
@@ -2702,7 +2706,7 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
}
if(se_count == 2 && se[1]->IndexInSection < se[0]->IndexInSection)
{
- cmsys_stl::swap(se[0], se[1]);
+ std::swap(se[0], se[1]);
}
// Get the size of the dynamic section header.