cmSystemTools: Early return if size makes later comparison false.
This commit is contained in:
parent
11093a03e0
commit
803317aab6
|
@ -366,6 +366,10 @@ 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++)
|
||||
|
|
Loading…
Reference in New Issue